Log in

View Full Version : Help with form...



jc_gmk
05-21-2007, 11:01 AM
Hi,
I've created a select menu which links with my php page and works fine, but I need to create a few options that go to an exact url.

Is this possible?



<form action="mypage.php" method="post">

<select name="choice">

<option value="one">one</option>
<option value="two">two</option>
<option value="three">three</option>
<option>Go To URL</option>

</select>

<input type="submit" value"Submit" />

</form>

thetestingsite
05-22-2007, 12:39 AM
I need to create a few options that go to an exact url


What exactly do you mean by this? You could make the option have whatever values you want (as long as they are not HTML code like <b>, <u>, etc):



<select name="choice">
<option value="http://example.com">Example.com</option>
<option value="testing">This is a test</option>
</select>


As for making it to where when the user choices a website from your list it redirects that user to their choice, then that would use some javascript. There is a script on DD that does this, but not sure of the URL off the top of my head. If neither of these are what you are after, please be more specific.

Hope this helps.