How to display records from database in select onchange event
I'm a beginner in coding of PHP, just want to ask how to display records
using the script below?
$option = '';
while($row = mysql_fetch_assoc($get))
{
$option .= '<option value = "'.$row['rfq'].'">'.$row['rfq'].'</option>';
}
?>
<form>
<select>
<option value="ALL">ALL</option>
<?php echo $option; ?>
</select>
</form>
ALL option is load when the page runs and displays all the record in
table, and when I choose 13-001 I want to display the record of 13-001.
How to do that?
No comments:
Post a Comment