I have this PHP code that is displaying multiple radio buttons:
<?php
foreach ($_SESSION["resellers"] as $reseller) {
$sql2="SELECT * from reseller where sequence = '".$reseller."' ";
$rs2=mysql_query($sql2,$conn) or die(mysql_error());
$result2=mysql_fetch_array($rs2);
echo '<input type="radio" name="reseller" value="'.$reseller.'" /> '.$result2["company"].'<br>';
}
?>
i want to run another SQL query a little lower down the page based on the checked radio button:
<select name="reseller_customer">
<option value="">Please Choose</option>
<?php
$sql2="SELECT * from customer where resellerid = '".$reseller."' ";
$rs2=mysql_query($sql2,$conn) or die(mysql_error());
$result2=mysql_fetch_array($rs2);
echo '<option value="'.$reseller.'">'.$result2["company"].'</option>';
?>
</select>
how can i do the where resellerid = "CHECKED RADIO BUTTON"