Re: Displaying Results
| From: | Donovan Brooke | Date: | Tue, 15 Feb 2011 20:26:06 +0000 |
| Subject: | Re: Displaying Results | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-47680@lists.php.net to get a copy of this message | ||
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