Ethan Rosenberg wrote:
Dear List - I have a form. In one field, the customer types the name of a product. The first seven(7) results of the MySQL query that the entry generates should be displayed as a clickable drop down list. How do I do it? Thanks. Ethan MySQL 5.1 PHP 5.3.3-6 Linux [Debian (sid)]
You said you have a form.. do have anything else. ;-).. ie, the mysql query etc.. (not sure what you are needing an answer to.. retrieving records from mysql, or how to display them)
Anyway, I think you mean you want to have "7 option's in a select form element"?
print "<select name=\"Somename\">"; //Your loop of found records starts here print "<option value=\"$dbfield\">$otherdbfield</option>"; //Your loop ends here print "</select>"; .. Me thinks we need more input.. maybe post the code that you have. Donovan -- D Brooke -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php