0

How do i get selected results to be displayed on another page?

The output of the code below has a list with check boxes, i want only the results with checked check boxes to be be displayed on a different page, please assist... <?php mysql_connect("localhost", "root","") or die(mysql_error()); //Connect to server mysql_select_db("first_db") or die("Cannot connect to database"); //connect to database $search = $_POST['search']; $query = mysql_query("SELECT * FROM medical WHERE conditions LIKE '%$search%'"); // SQL Query while($row = mysql_fetch_array($query)) { Print "<tr>"; Print '<td align="center" >'.'<input type="checkbox" name="gender" value="male" >'. $row['conditions'] . "</td>"; Print '<td align="center">'. $row['icd_10'] . "</td>"; Print '<td align="center">'. $row['drugs']. "</td>"; Print '<td>'."<input type='number'/>"."</td>"; Print '<td>'."<input type='number'/>"."</td>"; Print '<td>'."<input type='number'/>"."</td>"; Print '<td>'."<input type='text'/>"."</td>"; Print '<td>'."<select name='Dosage'> <option value='space'> </option> <option value='one'>1 tablet a day</option> <option value='two'>1 tablet nocte</option> <option value='three'>1 tablet twice a day</option> <option value='four'>1 tablet 3 times ad day</option> <option value='five'>2 tablet twice a day</option> <option value='six'>2 tablet 3 times a day</option> <option value='seven'>1 spoon twice a day</option> <option value='eight'>1 spoon three times a day</option> <option value='nine'>2 spoons twice a day</option> </select>"."</td>"; Print '<td>'."<input type='text'/>"."</td>"; Print '<td>'."<form method='post'> <select name='Dosage'> <option value='space'> </option> <option value='one'>Capsules</option> <option value='two'>Ointment/Cream</option> <option value='three'>Injectible</option>

16th Oct 2017, 7:18 AM
Mukhwathi Lutendo Stanley
Mukhwathi Lutendo Stanley - avatar
1 Odpowiedź
0
give to all your inputs names and take values by $_POST['name of your input']
16th Oct 2017, 7:32 AM
Yaroslav Pieskov
Yaroslav Pieskov - avatar