Email Sending Form

Could somebody please tell me why this isn’t working, please? Below you’ll find the full code(HTML+PHP) sending an email, thanks.

[php]<?php
if ($_POST[‘submitted’]==1) {
$errormsg = “”;
if ($_POST[clientname]){
$clientname = $_POST[‘clientname’];
}
else{
$errormsg = “Please enter your name”;
}
if ($_POST[clientemail]){
$clientemail = $_POST[‘clientemail’];
}
else{
$errormsg = “Please enter your email address”;
}
if ($_POST[shirtname]){
$shirtname = $_POST[‘shirtname’];
}
else{
$shirtname = $clientname;
}
if ($_POST[shirtaddress]){
$shirtaddress = $_POST[‘shirtaddress’];
}
else{
$errormsg = “Please enter your shipping address”;
}
if ($_POST[shirtcity]){
$shirtcity = $_POST[‘shirtcity’];
}
else{
$errormsg = “Please enter your shipping city”;
}
if ($_POST[shirtstate]){
$shirtstate = $_POST[‘shirtstate’];
}
else{
$errormsg = “Please enter your shipping state”;
}
if ($_POST[shirtzip]){
$shirtzip = $_POST[‘shirtzip’];
}
else{
$errormsg = “Please enter your shipping zip code”;
}
if ($_POST[country]){
$country = $_POST[‘country’];
}
if ($_POST[size]){
$size = $_POST[‘size’];
}
else{
$errormsg = “Please select your t-shirt size”;
}

if ($clientname && $clientemail && $shirtname && $shirtaddress && $shirtcity && $shirtstate && $shirtzip && $country && $size){

$mailcontent = "TEST";
$mailto = "[email protected]";
$subject = "Free T-Shirt Request";
$mailheader = "From: $clientemail \r\n";
mail($mailto, $subject, $mailcontent, $mailheader) or die("Error!");
echo "SENT!";

}
else {
echo $errormsg;
}

}
?>[/php]

Thanks in advance!

Here you can find the HTML code:

http://pastebin.com/gBCZT3Ff

Thanks again!

Sponsor our Newsletter | Privacy Policy | Terms of Service