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['name'];
$bedrijfsnaam = $_POST['bedrijfsnaam'];
$adres = $_POST['adres'];
$plaats = $_POST['plaats'];
$postcode = $_POST['postcode'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$socialemedia = $_POST['socialemedia'];
$website = $_POST['website'];
$Type1 = $_POST['Type1'];
$type = $_POST['type'];
$productendiensten = $_POST['productendiensten'];
$productendiensten_anders = $_POST['productendiensten_anders'];
$vragen = $_POST['vragen'];
$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['Burger']))
{
header("Location: burgerthanks.htm"); //the user will be sent to this page
}
if (isset ($Type1['Farm'])) {
header('Location: option2.htm');
} else
header('Location: thanks1.htm');
?>


