I retrieve info from a database and stick it in an array, then show
it as a html list box select thingy.
Here is my code: -
<select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
<?
$result = DBquery("SELECT * FROM suppliers",$db);
$myrow = DBfetch_array($result);
while ($myrow = DBfetch_array($result))
{
echo '<option>'.$myrow['Name'].'</option>';
}
?>
For some reason on the page, the first entry in the database doesn't show.
When I go into mySQL and execute the query all 4 rows are returned, but for some reason this page only shows 3, not the 1st one in the database.
Any ideas on what is going on would be appreciated.
Emma 😕