Hi,
I'm using the following code by which users pick up a name from a field in a table. It worked well for a fair bit but now my table has about 2500 odd names and its getting tedious scrolling thru the list .
Can anyone suggest a more efficient way to go about it ? maybe a user typing the first 3 letters of a name or some such ??
Customer</td><td><select name="customer"><option value="">[Select One]
<?php
mysql_connect("localhost", $dbname, $dbpasswd )
or die ("Unable to connect to server.");
mysql_select_db($database)
or die ("Unable to select database.");
$result = mysql_query("SELECT DISTINCT `Company` FROM `Customers` ORDER BY `Company` asc ");
if ($myrow = mysql_fetch_array($result)) {
do {
printf("<option>
%s", $myrow["Company"]);
} while ($myrow = mysql_fetch_array($result));
}
?></select>
Thanks. Swati