I have added a fold-out menu to my html but for the life of me I can't figure out how to add the choises you can make there to my mail form.
To have a look with what I mean when I say fold out menu look here:
http://www.albruna.nl/test/bestelencontact.html
you can see that you can choose from 7 different cars.
But how do I add the selection made by a visitor (if they make a selection if not no problem) to this mail form I use?
Can anyone help me out here I am a newbie to php so keep it simple if you can
<?
$mailto = "yourmail@addy.nl" ;
$subject = "Contactformulier" ;
$formurl = "http://www.albruna.nl/test/bestelencontact.htm" ;
$errorurl = "http://www.albruna.nl/fout.html" ;
$thankyouurl = "http://www.albruna.nl/dankuwel.html" ;
$naam = $_POST['naam'] ;
$voorletter = $_POST['voorletter'];
$adres = $_POST['adres'];
$postcode = $_POST['postcode'];
$plaats = $_POST['plaats'];
$land = $_POST['land'];
$email = $_POST['email'] ;
$testie = $_POST['testie'];
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($_POST['naam']) || empty($_POST['voorletter']) || empty($_POST['land']) || empty($_POST['comments'])) {
header( "Location: $errorurl" );
exit ;
}
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------- opmerkingen -------------------------\n\n" .
"naam:".$naam . "\n".
"voorletter:".$voorletter . "\n".
"adres:".$adres . "\n".
"postcode:".$postcode . "\n".
"plaats:".$plaats . "\n".
"land:".$land . "\n".
"email:".$email . "\n".
"testie:".$testie . "\n".
$comments .
"\n\n------------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper, "From: \"$naam\" <$email>\nReply-To: \"$naam\" <$email>\nX-Mailer: chfeedback.php 2.01" );
header( "Location: $thankyouurl" );
exit ;
?>
Regards,
Martin