Page 1 of 1

Need help in linking....

Posted: Thu May 20, 2004 11:48 pm
by denfire
I already create a form and i don't know what PHP code should i use to direct connect for each of the option in drop down list, then when i click submit, it will direct link to the page that i want.
Anyone can show me the code of this matter??
thanks a lot...

Posted: Thu May 20, 2004 11:53 pm
by feyd
here's the basics.. although not tested...this isn't PHP btw, it's javascript, since you said "direct connect."

Code: Select all

<form action="some_url">
<select name="whatever" onChange="this.form.action = this.options[this.selectedIndex].value">
<option value="http://somewhereelse.com">somewhere</option>
<option value="http://anotherplace.com">another place</option>
</select><input type=submit value="go" /></form>

Posted: Fri May 21, 2004 1:54 am
by denfire
Really thank you for the help. now i know how to do it already..:)