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...
Need help in linking....
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
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>