Good day every one, i am trying to check if a radio button were clicked, and iwant the value of that clicked radio button to pass on a variable, i will used that variable to compare records in database with the same values from it. and display all records on list box?? but when i try to run this code nothings happen
<td><input type="radio" name="1stChoice" value="TESDA" ></td><br>
<td align = "center">
<select name="course1">
<?php
include('dbconnection.php');
if(isset($_POST['1stChoice'])) {
if($_POST['1stChoice'] == 'TESDA') {
$choose='TESDA';
} elseif($_POST['1stChoice'] == 'CHED') {
$choose='CHED';
}
}
$mysql_select=mysql_query("select * from courses where Institution = '$choose' ",$mysql);
while($row=mysql_fetch_array($mysql_select))
{
?>
<option><?php $row['Program']; ?></option></td>
</select>
<?php } ?>
</tr>
<td width="20%">2nd choice:</td>
<td><input type="radio" name="2ndChoice" value="CHED" ></td>
<td><input type="radio" name="2ndChoice" value="TESDA" ></td><br>
<td align = "center">
<select name="course2">
<?php
include('dbconnection.php');
if(isset($_POST['2ndChoice'])) {
if($_POST['2ndChoice'] == 'TESDA') {
$choose='TESDA';
} elseif($_POST['2ndChoice'] == 'CHED') {
$choose='CHED';
}
}
$mysql_select=mysql_query("select * from courses where Institution = '$choose' ",$mysql);
while($row=mysql_fetch_array($mysql_select))
{
?>
<option><?php $row['Program']; ?></option></td>
</select>
<?php } ?>