if(trim($_POST[cmd])=="Submit"){
if($_POST[txtname]==""){
$error="Please enter your Name!
";
}
if($_POST[txtcompany]==""){
$error.="Please enter your Company
";
}
if($_POST[txtposition]==""){
$error.="Please enter your Position
";
}
if($_POST[txtaddress]==""){
$error.="Please enter your Address
";
}
if($_POST[txtcity]==""){
$error.="Please enter your City/State
";
}
if($_POST[txtpostalcode]==""){
$error.="Please enter your Postal Code
";
}
if($_POST[txttelephone]==""){
$error.="Please enter your Telephone Number
";
}
if($_POST[txtemail]==""){
$error.="Please enter your Email Address
";
}
if(!empty($error)){
echo "
$error
";
}else{
echo "
Message Sent!Thank you for continues support!
";
for($i=1;$i<=13;$i++){
if($_POST['chk_'.$i]){
$txtchk.=(!isset($txtchk))?$_POST['chk_'.$i]:','.$_POST['chk_'.$i];
}
}
$to ="Request Information
";
$header ="To: $to \r\n";
$header.='From: CorpTrade \r\n';
$header.='Reply-To: webmaster@example.com' . "\r\n";
$header.='X-Mailer: PHP/' . phpversion();
$subject="Corp Trade Information Inquiry Form";
$msg="
-------------------------------------------------------------
Corptrade Environmental Services Ltd
-------------------------------------------------------------
You have a received a Request Inquiry Information coming from CorpTrade.
Request for Information the Following:
$txtchk;
if Others Specify: $_POST[others]
-------------------------------------------------------------
The Contact Information
-------------------------------------------------------------
Name: $_POST[txtname]
Position: $_POST[txtposition]
Company: $_POST[txtcompany]
Address: $_POST[txtaddress]
City/State: $_POST[txtcity]
Postal Code: $_POST[txtpostalcode]
Telephone: $_POST[txttelephone]
Fax: $_POST[txtfax]
Email Address: $_POST[txtemail]
Type of Business: $_POST[txtbusiness]
-------------------------------------------------------------
";
mail($to,$subject,$msg,$header);
}
}
?>