Need help in linking....

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
denfire
Forum Newbie
Posts: 2
Joined: Thu May 20, 2004 11:48 pm

Need help in linking....

Post 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...
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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>
denfire
Forum Newbie
Posts: 2
Joined: Thu May 20, 2004 11:48 pm

Post by denfire »

Really thank you for the help. now i know how to do it already..:)
Post Reply