Oleg Butuzov
New member
<?
mysql_connect("localhost", "pejone", "pejone");
mysql_select_db("dreamstan");
$date=date("m-d-y");
$today=explode("-", $date);
$days = date ("Y-m-d", mktime (0,0,0, $today['0'], $today[1]-3, $today[2]));
$query=mysql_query("SELECT * FROM `news` WHERE `date` < '$days' AND `is_1_email_send`= '0' ");
while($data=mysql_fetch_array($query))
{
//dont forget to update your data base
//mail function here "$data";
}
?>
mysql_connect("localhost", "pejone", "pejone");
mysql_select_db("dreamstan");
$date=date("m-d-y");
$today=explode("-", $date);
$days = date ("Y-m-d", mktime (0,0,0, $today['0'], $today[1]-3, $today[2]));
$query=mysql_query("SELECT * FROM `news` WHERE `date` < '$days' AND `is_1_email_send`= '0' ");
while($data=mysql_fetch_array($query))
{
//dont forget to update your data base
//mail function here "$data";
}
?>