<?php
/* Set e-mail recipient */
$myemail  = "info@carlylecleaners.com";

/* Check all form inputs using check_input function */

$yourname = $_POST['yourname'];
$email    = $_POST['email'];
$ip= $_SERVER["REMOTE_ADDR"];
$date=date("d m Y ");
$time= date("H:i");
 $subject = "Customer signed up for special offer ";

if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
{
?>
<script type="text/javascript">
alert('Please enter a valid email address ');
history.go(-1);
</script>
<?php exit();
}

if(empty($yourname))
{
?>
<script type="text/javascript">
alert('Please fill in your name');
history.go(-1);
</script>
<?php exit();
}

$message = "Hello!

Your customer has signed up for special offer:

Name: $yourname
E-mail: $email
Subject: $subject
date:$date
time:$time
ip address:$ip
End of message
";

/* Send the message using mail() function */
mail($myemail, $subject, $message );
?>
 
<div id="f1">
<div id="f3">
<div class="columncontainer">
<div class="fcolumn">
<div class="fcolumnpage">

<img src="../wp-content/uploads/2011/10/specialoffers/carlylecleaners_qualitydrycleanig_bestdeals_sanmateo_ca_specialoffers.jpg" alt="" style="width:197px; height:197px;" />
<div class="fpagetext"> 
 

</div>
</div>
</div>

  
<div class="tcolumn">
<div class="section">
 
  

<div class="maintitle">
<div class="maintitletext">Special Offers</div>
</div>
 
<div class="addspace"></div>
<div class="tcolumntext">

<span class="callout"><br><br>
 
<div class="deliverform" style="margin-top:0px;"><div class="align-left">Thank you <span class="bold"><?php echo $yourname  ?></span> for your interest.  <br>
We will send you monthly mails to <span class="bold"><?php echo $email  ?> </span> with a discount coupon.
</div>
 
</div>               
 
</div>
</div>
</div>

<div class="fcolumn">
<div class="fcolumnpage"> <a href="http://www.carlylecleaners.com/?p=30"><img src="../wp-content/uploads/2011/10/doortodoorservice/carlylecleaners_bestdrycleanig_sanmateo_ca_doortodoorservice_phone.png" alt="" style="width:197px; height:93px;" /> </a>

<div class="fpagetext">

<span class="callout">Questions? 
Call 650 766-7802 </span> 
</div></div></div>


</div>
</div></div>