...

View Full Version : Form submit re-direct



Daman
12-07-2006, 03:02 PM
Looking for some help on this form I am building.

http://invites.fasken.com/skiday_07/rsvp.html

The very last question for ski rentals has 2 radio buttons. YES and NO.

What I need it to do is when some one Submits the form with NO selected for rentals they are sent to a thanks.html page. But is they select YES I want them directed to rentals.html page.

Please help:confused:

Thanks!:)

_Aerospace_Eng_
12-07-2006, 03:55 PM
You don't need javascript for this. You are already using a server side script so just check the value using php checking to see if they choose yes or no then use a the php header() function to redirect the user.

Daman
12-07-2006, 04:08 PM
Here is what I have now to send it to thanks.html

$URL = "http://invites.fasken.com/skiday_07/thanks.html";
header ("Location: $URL");

How can i write this to send to a different page if a different option in the form is selected?

Thanks

_Aerospace_Eng_
12-07-2006, 04:10 PM
if($_POST['rental'] == 'No')
{
$URL = "http://invites.fasken.com/skiday_07/thanks.html";
}
else
{
$URL = "http://invites.fasken.com/skiday_07/rentals.html";
}
header ("Location: $URL");

Daman
12-07-2006, 04:14 PM
Thank you so much for your help. :thumbsup:

Ike One
01-12-2007, 07:16 PM
I have the same problem but im not using server side code. Here is my code,
.
<form name="UPTmlform9796" action="http://elabs6.com/functions/mailing_list.html" method="Array">
<input type="hidden" name="mlid" value="9796">
<input type="hidden" name="surveyid" value="19235">
<input type="hidden" name="siteid" value="22979">
<input type="hidden" name="redirection" value="">
<input type="hidden" name="activity" value="submit">
<input type="hidden" name="submitaction" value="3">
<input type="hidden" name="email" value="<EMAIL_ADDRESS>">

<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td>
<font color="#000000" font="Arial" size="2">Thank You For Subscribing.</font>
</td>
<td>
<input type="radio" name="val_44976" value="Commercial Customer">
Commercial Customer
<br>
<input type="radio" name="val_44976" value="Retail Customer">
Retail Customer
<br>
</td>
</tr>
<tr>
<td>
<font color="#000000" font="Arial" size="2">Company Name</font>
</td>
<td>
<input type="text" name="val_14" value="">
</td>
</tr>
<tr>
<td>
<input type="submit" name="submit" value="Submit">

</td>
</tr>
</table>
</form>

i need the choosing Retail to direct you to one url and Commercial to another



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum