File: /var/www/vhosts/pgkdistribution.com.au/citisolar.com.au/procenquiry.php~
<?php
require ("include/email.php");
//process the post variables...
$name = $_POST["nameField"];
$email_addr = $_POST["emailField"];
$subject = $_POST["subjectField"];
$phone = $_POST["phoneField"];
$suburb = $_POST["suburbField"];
$msg = $_POST["enquiryField"];
$ip = $_SERVER['REMOTE_ADDR'];
// Construct the message....
$mail .= "Name: ".$name."\n";
$mail .= "Email Address: ".$email_addr."\n";
$mail .= "Phone: ".$phone."\n";
$mail .= "Suburb: ".$suburb."\n";
$mail .= "Subject: ".$subject."\n";
$mail .= "IP: ".$ip."\n\n";
$mail .= "Message:\n".$msg."\n";
// If any lines are larger than 70 characters, we will use wordwrap()
$message = wordwrap($message, 70);
// Send the email...
switch ($_POST["stateField"]) {
case 'qld':
$_SESSION['SITE_EMAIL'] = "citisolar@optusnet.com.au";
break;
case 'vic':
$_SESSION['SITE_EMAIL'] = "adam@citisolar.com.au";
break;
case 'can':
$_SESSION['SITE_EMAIL'] = "admin@citistylehomeimprovements.com.au";
break;
default:
$_SESSION['SITE_EMAIL'] = "citisolar@optusnet.com.au";
}
mail($_SESSION['SITE_EMAIL'], $subject, $mail, "From: ".$email_addr."\r\n");
$mail = str_replace("\n", "<br>", $mail);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CitiSolar - Home</title>
<meta content="">
<style></style>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include "header.php"; ?>
<div id="content">
<p>Thank you for your enquiry. Citisolar will get back to you as soon as possible.</p>
</div>
<?php include "footer.php"; ?>
</body>
</html>