<?php
if (isset($_POST['submit'])){
$to="vishal@tmcards.com";
$from=$_POST['email'];
$fname=$_POST['fname'];
$lname=$_POST['lname'];
$cntno=$_POST['telno'];
$address=$_POST['address'];
$state=$_POST['state'];
$country=$_POST['country'];
$cname=$_POST['company'];
$fax=$_POST['fax'];
$comment=$_POST['message'];
$zipcode=$_POST['zipcode'];
$ip=$_SERVER['REMOTE_ADDR'];
$subject="Plastic Playing Cards Enquiry From plasticplayingcards.us";
$message=<<<END
Dear Sales Team,

IP Address : $ip

There is one enquiry from a customer $fname

First Name : $fname

Last Name : $lname

Contact No : $cntno

Company Name : $cname

Address : $address

State : $state

Zipcode : $zipcode

Country : $country

Enquiry Message : $comment
END;
$headers=<<<EOSTR
From:<$from>
Cc:<manish@foub.com>
Bcc:<suresh@tmcards.com>
EOSTR;
ini_set("SMTP","127.0.0.1");
ini_set("smtp_port","25");
mail($to,$subject,$message,$headers);
}

echo "We appreciate your Query sent to us. Our representative will respond to your query shortly.<br><br>Click here to go to homepage <a href='http://www.playingcardshome.com'>Home</a>";
header
?>