hi guys..i have a question...let me explain first..for my project i'm doing a checkbox for user to tick for several documents..after user click the checkbox..it will save in the database..based on that database..what i want is to display that checkbox..for example..if this checkbox have 10 ..then if the user tick all..then i want to display the name of documents..if user only thick 1 document..only a name will be display..its like a name of form..i had made a 2 tables in database.. one for checkboxes update in database..the next is for name of document include code and description of document..so i need to make an select from database...it is true?...but it didn't work! i also using an conditional for this..for example: if the (document = 1)..then it will display the name of that document...if (document = 0)..nothing to display..i just want only value 1 to be display.but how to make it? sory for long explaination...hope u guys understand..

here my code in html for checkbox:

<input type="checkbox" name="BMK81A" value="1" >     
          1. <br>

          <input type="checkbox" name="BMK81" value="1" >     
          2.  <br>

          <input type="checkbox" name="DL3" value="1" >     
          3.  <br>       

          <input type="checkbox" name="DL2" value="1" >     
          4.  <br>

          <input type="checkbox" name="DL1" value="1" >     
          5.  <br>

          <input type="checkbox" name="S1" value="1" >     
          6.  <br>

          <input type="checkbox" name="S2" value="1" >     
          7.  <br>


           <input type="checkbox" name="S3" value="1" >     
          8.  <br>


          <input type="checkbox" name="S4" value="1" >     
          <br>

          <input type="checkbox" name="S5" value="1" >     
          <br>

          <input type="checkbox" name="S6" value="1" >     
          11. <br>

          <input type="checkbox" name="S7" value="1" >     
          12. <br>

          <input type="checkbox" name="D1" value="1" >     
          13. <br>

          <input type="checkbox" name="A1" value="1" >     
          14. <br>

          <input type="checkbox" name="RE1" value="1" >     
          15.<br>

          <input type="checkbox" name="LU2" value="1" >     
          16. <br>

          <input type="checkbox" name="NPT" value="1" >     
          17. <br>


         <input type="checkbox" name="SRP" value="1" >     
          18. <br>


          <input type="checkbox" name="KTDP" value="1" >     
          19. <br>

          <input type="checkbox" name="KDP" value="1" >     
          20. <br>

          <input type="checkbox" name="USPD" value="1" >     
          21. <br>

before this when i want to display something @ data, i will use like this way:

$sql22= "SELECT * FROM "" WHERE KOD_DOKU = '' ";



    $result22 = mysql_query($sql22);
    $row22 = mysql_fetch_array($result22);


    $BMK81A = $row22['BMK81A'];
    $BMK81 = $row22['BMK81'];
    $DL3 = $row22['DL3'];
    $DL2 = $row22['DL2'];
    $DL1 = $row22['DL1'];
    $S1 = $row22['S1'];
    $S2 = $row22['S2'];

when part for display i'm only use this part AND ITS WORK! :

 <td bgcolor="#A4DDED" class="style21"><?php 
            //$sql="SELECT * FROM  "" WHERE ""= '' ";
        //$result = mysql_query($sql);
        //$row = mysql_fetch_array ($result);
            echo $row22['BMK81A']; 
             ?></td>

as you all have read my problem as above ..so now for this problem i do not know how to do it..let me show when i'm doing this:

it is true? for this I do not know how to use conditional statement.. :'(
- if i'm doing this i expect the output will appear.. but its not working!:'(

<?php
        $document = $_GET['dokumen'];
          if ($dokumen['BMK81A'] ==1)
          { 
            $desc6 = 'BMK81A'; 
          }

          $sql22 = " SELECT * FROM "" WHERE "" = '' ";
        $result22 = mysql_query($sql22);
        $row22 = mysql_fetch_array ($result22);
          echo $row22['BMK81A']; 

          ?>

hope you guys can help me to solve this... :'( i'm not good in php..i'm still new in php..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.