Hi, all this is my file expire_show.php
it shows expiry of those agreements which will expire with in 90 days from current date.
Users have to login to their accounts for viewing these expiry alerts.
but they require these alerts on their email.
1. how i can format these for email?
2 how I can send automatic email daily to selected persons?
<?php
$con = mysql_connect("localhost","root","root");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("onm", $con);
$result = mysql_query("SELECT * FROM lease_center WHERE (current_date() >= (LAPeriodEnd - INTERVAL 90 DAY)) AND (current_date() <= (LAPeriodEnd - INTERVAL 0 DAY)) ");
while($row = mysql_fetch_array($result))
{
echo "<table cellpadding=2 cellspacing=2 width=100%>
<tr>
</tr>";
echo "<tr>";
echo "<th bgcolor=#FFCC00 width=250px>SiteId</th>";
echo "<td bgcolor=#FEE9A9>" . $row['SiteId'] . "</td>";
echo "</tr>";
echo "<tr>";
echo "<tr>";
echo "<th bgcolor=#FFCC00>
LAPeriodEnd</th>";
echo "<td bgcolor=#FEE9A9>" .date("j-F-Y",strtotime($row['LAPeriodEnd'])). "</td>";
echo "</tr>";
echo "<tr >";
echo "<th bgcolor=#FF6600 height=10px>
</th>";
echo "<td bgcolor=#FF6600 height=10px></td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>