Hope someone can help me out. I have a table with +-4000 Postal codes en their cities. Now I have 2 dropdowns where people can searh between.
for exemple : give me all records between postal 1000 and 2000.
The problem is that the second dropddown has only a few postals with the same code. A memory Problem.
Code: Select all
$sql = "SELECT * FROM postal_bel ORDER BY postal asc;";
$result1 = mysql_query($sql,$conn);
$numrows = mysql_num_rows($result1);
for ($i=0;$i<$numrows;$i++)
{
$myrow = mysql_fetch_array($result1);
$value_arrayї$i] = "<option value=".$myrowї'postal'].">".$myrow ї'postal']." ".$myrowї'city']."</option>";
}
mysql_free_result($result1);
?>
<select name="searchpostal1">
<?php
for ($i=0;$i<sizeof($value_array);$i++)
echo $value_arrayї$i];
?>
</select>
//Dropdown 2 : Problem is only Filled a bit ?
<select name="2">
<?php
for ($i=0;$i<sizeof($value_array);$i++)
echo $value_arrayї$i];
?>
</select>Thx in advance!