How do I make a drop down menu that displays information from a table.
example:
Name - email - username
- Name2 - email2 - username2
- Name3 - email3 - username3
- Name4 - email4 - username4
- Name5 - email5 - username5
But when it submits I want it to goto a certain web page, depending on what I choose.
Thanks if you can help,
John
Drop down menu
Moderator: General Moderators
-
postalservice14
- Forum Newbie
- Posts: 2
- Joined: Thu May 30, 2002 4:14 pm
- Location: OR, USA
- Contact:
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
You have to query the database to get the data, then you run a loop to create an HTML form with a select box. You then (in the same page or another) have a bit of script that runs when the form is submitted and use that to determine what web page to forward to based on the choice made.
Check out the following:
http://www.php.net/manual/en/ref.mysql.php
http://www.php.net/manual/en/language.v ... efined.php
http://www.php.net/manual/en/function.header.php
This is sort of a rough outline of the steps you'd take to accomplish what you're looking for.
Mac
Check out the following:
http://www.php.net/manual/en/ref.mysql.php
http://www.php.net/manual/en/language.v ... efined.php
http://www.php.net/manual/en/function.header.php
This is sort of a rough outline of the steps you'd take to accomplish what you're looking for.
Mac
-
postalservice14
- Forum Newbie
- Posts: 2
- Joined: Thu May 30, 2002 4:14 pm
- Location: OR, USA
- Contact:
Thanks
Alright....I think I have it figured out....Thank you all that helped me
John
John