Hi all, I have looked everywhere (obviously) to find the snipet of code required to show results from a dropdown list. I just need something simple that works. Here is my code so far:
<?php
$sql="SELECT * FROM licensing ORDER BY id DESC";
$result=mysql_query($sql);
$options="";
while ($row=mysql_fetch_array($result)) {
$id=$row["id"];
$url=$row["l_url"];
$phone=$row["l_phone"];
$state=$row["l_state"];
$sullstate=$row["l_statefull"];
$options.="<option value=\"$id\">".$state;
}
?>
<select name="listing"><option value=0>Choose<?=$options?></option></select>
<input type="submit" value="Search"/>
If someone could complete the echo results from the selected state, showing the variable results.
I appreciate any help.