(solved) Dropdown Menu Links

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
davidjwest
Forum Commoner
Posts: 67
Joined: Sat Nov 06, 2004 5:26 am
Location: Leeds, Yorkshire, England

(solved) Dropdown Menu Links

Post by davidjwest »

Hello, I'd be grateful for anyone who can help with this.

I need to create a dropdown menu which lists options from data in an SQL table, that much I can do.

But I want the dropdown options to route through to another bit of PHP, passing a variable depending on which option was chosen, as soon as the dropdown option is clicked on.

How do I do this please?

Do I somehow embed the URL in the select?

Code: Select all

echo "<option value='$loc[$islands2]'>$loc[$islands2]";
I've tried adding the URL for the other bit of PHP code with ?variable=$var but it doesn't seem to recognise it, what am I doing wrong or am I trying to do the impossible?

Thanks for your time!
Last edited by davidjwest on Thu Sep 01, 2005 2:27 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

search around for info on jump-box or variants thereof, basically, it involves using an onchange event in the select box which can trigger a submission or just loading the corresponding script/page directly...
davidjwest
Forum Commoner
Posts: 67
Joined: Sat Nov 06, 2004 5:26 am
Location: Leeds, Yorkshire, England

Post by davidjwest »

Thanks!

Sorry about not saying thanks and closing down my threads with (solved) I am doing it now after a friend reminded me of my manners!

Hope I didn't annoy anyone too much, you guys are too helpful for me to alienate! :D
Post Reply