the above code will still return a T_STRING error because there is no semicolon
This code should work:
<?php
$m1 = $_POST['m1'];
$m2 = $_POST['m2'];
$e1 = $_POST['e1'];
$e2 = $_POST['e2'];
$pc = $_POST['pc'];
$br = $_POST['br'];
$cn = $_POST['cn'];
$fn = $_POST['fn'];
$bld = $_POST['bld'];
$eld = $_POST['eld'];
if (eregi('http:', $bld)) {
die ("Naughty Naughty! ");
}
if(!$e1 == "" && (!strstr($e1,"@") || !strstr($e1,".")))
{
echo "<h2>Error - Enter valid e-mail</h2>\n";
$badinput = "<h2>Form Not Sent</h2>\n";
echo $badinput;
die ("Go back! ! ");
}
if(empty($m1) || empty($e1) || empty($bld )) {
echo "<h2>Error - fill in all fields</h2>\n";
die ("Use back! ! ");
}
$todayis = date("l, F j, Y, g:i a") ;
$m1 = $m1;
$subject = $m1;
$cn = stripcslashes($cn);
$message = " $todayis [EST] \n
Main Tenanat Name : $m1 \n
Secondary Tenant Name: $m2 \n
Primary Tenant Email: $m1 ($e1)\n
Secondary Tenant Email: $e2 \n
Property Code: $pc
Bedrooms: $br
Coordinator Name: $cn \n
Firm Name: $fn \n
Begin Lease Date: $bld \n
End Lease Date: $eld \n";
$from = "From: $m1\r\n";
mail("no-reply@edgeofamericaenterprises.org,", $subject, $message, $from);
?>
<p align="center">
Date: <?php echo $todayis ?>
<br />
Thank You : <?php echo $m1 ?> ( <?php echo $e1 ?> )
<hr />
</p>