I have been working on a little wedding site I am putting together and have a small PHP form on there to allow people to send an RSVP to whether they are coming or not. I was just testing the form and it works but it shows the same confirmation page whether the user selects "Yes" or "No" and I want to show a different page depending on what option is selected.
I used the phpFormGenerator site to build this and it generates a processor.php file with the folowing code:
Could anyone help edit this so it re-directs the user to a different confiormation page if "No" is selected?
Site is here btw:
http://www.rdoyle.info/wedding/v4/reception.html
Cheers
I used the phpFormGenerator site to build this and it generates a processor.php file with the folowing code:
Code:
<?php
$where_form_is="http://www.rdoyle.info/wedding/v4".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
session_start();
if( ($_SESSION['security_code']==$_POST['security_code']) && (!empty($_POST['security_code'])) ) {
mail("[email protected]","phpFormGenerator - Form submission","Form data:
First Name: " . $_POST['field_1'] . "
Sir Name: " . $_POST['field_2'] . "
Are you attending?: " . $_POST['field_3'] . "
Email Address: " . $_POST['field_4'] . "
Phone Number: " . $_POST['field_5'] . "
Comments: " . $_POST['field_6'] . "
powered by phpFormGenerator.
");
include("confirm.html");
}
else {
echo "Invalid Captcha String.";
}
?>
Site is here btw:
http://www.rdoyle.info/wedding/v4/reception.html
Cheers