Page 1 of 1

(solved) Dropdown Menu Links

Posted: Fri Aug 19, 2005 4:26 pm
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!

Posted: Fri Aug 19, 2005 5:32 pm
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...

Posted: Thu Sep 01, 2005 2:28 pm
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