Displaying Results

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)]



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Ethan Rosenberg [ Di, 15 Februar 2011 20:28 ] [ ID #2055213 ]

Re: Displaying Results

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
dbrooke [ Di, 15 Februar 2011 21:26 ] [ ID #2055214 ]
PHP » gmane.comp.php.database » Displaying Results

Vorheriges Thema: Search relevance
Nächstes Thema: Mysql 5.5 and PHP Mysql API Version 5.1.41