RE: [PHP] Drop down Menu
| From: | Liam dot Gibbs at dfait-maeci dot gc dot ca | Date: | Tue, 08 Oct 2002 19:07:21 +0000 |
| Subject: | RE: [PHP] Drop down Menu | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-119319@lists.php.net to get a copy of this message | ||
<<Hi, I need to do a drop down menu that loads the contents from a msql
database. Like this: I need a select that has the name of every salesman of
a certain department, and this info is dynamic and is recorded in a database
(MySql).
So what would the select have to be like?>>
Well, to start you off, the select would have to be this:
SELECT salesman FROM salesman_database;
(You may have to check out a MySQL site for some specifics, such as what
other information do you need than the name--number? Department?--and are
there any filters you need--some have left?).
For the rest of it (as in how do you make your results into a dropdown list)
that's not a PHP question. You can spit it out by doing a
mysql_query/fetch_mysql_row combo, but that will be a straight HTML list.