Dear All
I have made a successful html form with mail.php "thing" my only problem is I want to be able to redirect to 2 different thank you pages based on a value entered in the html form.
Value field is "Type1" and people can enter either burger, farm or shop
Thank you.....
this is my mail.php
<?php
$name = $_POST;
$bedrijfsnaam = $_POST;
$adres = $_POST;
$plaats = $_POST;
$postcode = $_POST;
$email = $_POST;
$phone = $_POST;
$socialemedia = $_POST;
$website = $_POST;
$Type1 = $_POST;
$type = $_POST;
$productendiensten = $_POST;
$productendiensten_anders = $_POST;
$vragen = $_POST;
$formcontent=" Bevestiging van: $name, deze persoon is $Type1 \n Bedrijfsnaam: $bedrijfsnaam \n Adres: $adres $postcode $plaats \n Gebruiker van Sociale Media: $socialemedia \n Producten en Diensten: $productendiensten \n Anders: $productendiensten_anders \n Vragen en/off Opmerkingen: $vragen";
$recipient = "me@myemail.com";
$subject = "Contact";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
if (isset ($Type1))
{
header("Location: burgerthanks.htm"); //the user will be sent to this page
}
if (isset ($Type1)) {
header('Location: option2.htm');
} else
header('Location: thanks1.htm');
?>