Forum Moderators: open

Message Too Old, No Replies

A Redirecting Validated Form

Need to agree to ToS before filling out an application.

         

atraweek

12:13 am on Dec 16, 2009 (gmt 0)

10+ Year Member



I need to have a validated form redirect to an application page after submitting. How would I go about this?

incrediBILL

1:01 am on Dec 16, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Simply make the first form submit pull up the next page which displays the next form.

Track the submission of the first form via a cookie or session so if the second form ever displays first, if the TOS wasn't agreed to you can redirect back to the TOS page to make sure it's checked off.

rocknbil

1:54 am on Dec 16, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard atraweek1, in what language?

<?php
header("content-type:text/html");
// "i-agree" is a checkbox, if it's not been checked,
// it will not exist in post
if (isset($_POST['i-agree'])) {
// display submit form here, store "i-agree" as a hidden
}
else {
// display TOS here, which posts back to this very script
}
?>

atraweek

5:43 pm on Dec 16, 2009 (gmt 0)

10+ Year Member



PHP would be fine.