if($_POST)
{
$varcName = stripslashes(trim($_POST['cName']));
$varEmail = stripslashes(trim($_POST['Email']));
$varsName = stripslashes(trim($_POST['sName']));
$vardesg = stripslashes(trim($_POST['desg']));
$varMaddress = stripslashes(trim($_POST['Maddress']));
$varPhone = stripslashes(trim($_POST['Phone']));
$varFax = stripslashes(trim($_POST['Fax']));
$varBuyer1 = stripslashes(trim($_POST['Buyer1']));
$varbuyer1int = stripslashes(trim($_POST['buyer1int']));
$varbuyer1prod = stripslashes(trim($_POST['buyer1prod']));
$varseller1 = stripslashes(trim($_POST['seller1']));
$varseller1int = stripslashes(trim($_POST['seller1int']));
$varseller1prod = stripslashes(trim($_POST['seller1prod']));
$varAddReq = stripslashes(trim($_POST['AddReq']));
$errmsg = "";
if($varcName == "")
$errmsg.="Please enter your company name.
";
else if(is_numeric($varName))
$errmsg.="Please enter text value in name.
";
if($varEmail == "")
$errmsg.="Please enter your Email address.
";
else if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $varEmail))
{
$errmsg.="Please enter valid Email address.
";
}
if($varsName == "")
$errmsg.="Please enter your name.
";
if($varTel == "")
$errmsg.="Please enter your telephone no.
";
else if(!is_numeric($varTel))
$errmsg.="Please enter numeric value in telephone no.
";
if($errmsg == "")
{
$Email="nirmals_shah@yahoo.co.in";
$msg = "Company Name:- ".$varcName."
Email
Address:- ".$varEmail."
Senders Name:- ".$varsname."
Designation:- ".$vardesg."
Company address:- ".$varMaddress.
"
Phone:- ".$varPhone."
Fax:- ".$varFax."
Buyer:- ".$varBuyer1."
Buyer Interested in :- ".$varbuyer1int."
Buyer Interested in Products :- ".$varbuyer1prod.
"
Seller :- ".$varseller1."
Seller Interested in :- ".$varseller1int."
Seller Interested in Products :- ".$varseller1prod."
Additional Requirements :- ".$varAddReq;
$headers = "Content-type: text/html; charset=iso-8859-1\n";
$headers .= "From:".$varEmail;
$subject="Enquiry from vipuldyes.com";
@mail($Email, $subject, $msg,$headers);
$varcName ="";
$varEmail ="";
$varsName ="";
$vardesg = "";
$varMaddress ="";
$varPhone ="";
$varFax ="";
$varBuyer1 = "";
$varbuyer1int = "";
$varbuyer1prod ="";
$varseller1 ="";
$varseller1int ="";
$varseller1prod ="";
$varAddReq = "";
header("location:downloads.htm");
die;
}
}
?>
|