Hello,
When I submit my home-built php contact form (below) the information doesn't make it to my inbox - it just disappears. There's no error log and once I click the Submit button, it says the info was submitted successfully.
<form method="POST" action="mailer.php">
Name:
<input type="text" name="name" size="19"><br>
<br>
Company:
<input type="text" name="company" size="19"><br>
<br>
e-Mail:
<input type="text" name="email" size="19"><br>
<br>
<input type="checkbox" name="check[]" value="digital_sample"> <b>Please send unrestricted digital access<br>
<input type="checkbox" name="check[]" value="physical_sample"> Reserve my physical, retail shipper pack</b><br><br>
<p style="text-align:center; font-family:Arial">
Shipping Instructions:<br>
<textarea rows="9" name="message" cols="30"></textarea><br>
<br>
<input type="submit" value="Submit" name="submit"></p>
</form>
<?php
$check_msg = "";
if(isset($_POST['submit'])) {
$to = "contact@stopsmokingforgood.com";
$subject = "Sample Request";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$company_field = $_POST['company'];
$message = $_POST['message'];
foreach($_POST['check'] as $value) {
$check_msg .= "Checked: ".$value;
}
$body = "From: ".$name_field.": E-Mail: ".$email_field." : Company: ".$company_field." : Message: ".$message." : ".$check_msg;
echo "Data has been submitted to ".$to;
mail($to, $subject, $body);
} else {
echo "blarg!";
}
?>