Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Form submit re-direct

    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

    Thanks!

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    PHP Code:
    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"); 
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you so much for your help.

  • #6
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •