Page 1 of 1

Drop down menu

Posted: Thu May 30, 2002 4:14 pm
by postalservice14
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

Posted: Fri May 31, 2002 1:57 am
by twigletmac
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

Thanks

Posted: Fri May 31, 2002 9:33 am
by postalservice14
Alright....I think I have it figured out....Thank you all that helped me

John