- Code: Select all
<?php
$emailSubject = 'Get A Quote';
$webMaster = 'xxxxxxxxxxx@gmail.com';
/* Gathering data vars */
$compNm = $_REQUEST['compNm'];
$contEmail = $_REQUEST ['contEmail'];
$selService = $_REQUEST['selService'];
$demo1 = $_REQUEST['demo1'];
$chkYes = $_REQUEST['chkYes'];
$chkNo = $_REQUEST['chkNo'];
$selQty = $_REQUEST['selQty'];
$cmntBox = $_REQUEST['cmntBox'];
/*determine if printing required*/
if(isset($_REQUEST['chkYes'])){
$printing = 'yes';
}
else
$printing = 'no';
$body = <<<EOD
<br><hr><br>
Company Name: $compNm<br>
Contact E-mail: $contEmail<br>
Service: $selService<br>
Deadline: $date<br>
Printing: $printing<br>
Comments: $cmntBox<br>
EOD;
$headers = "From: $contEmail\r\n";
$headers .="Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as html */
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Success Message</title>
<style type = "text/css">
body{
width: 640px;
height: 480px;
background-color: #408080;
color: #ffffff;
font-family: "Arial Narrow", "sans-serif";
}
</style>
</head>
<body>
<div>
<div align = "left"> "Thank you very much for requesting a quote from GS Creations.
We will get back to you shortly."
</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
I'm new to PHP coding, but I'm pulling my hair out over this. This code doesn't show up with any errors, but my variables don't return the input data within the email body. It shows up as...
Company Name:
Contact E-mail:
Service:
Deadline:
Printing:no
Comments:
Can you help me please?


