__(Added `[code]…[/code]
hi friends
i have create Equipment Calibration tracker web tool
i have create due date reached send auto mail program using php and mysql but not working
kindly help me .this my code
[code]
<?php
$currentDate = date(‘Y-m-d’); //this will get the current date
include(“dbconnection.php”);
$remind_query1 = “SELECT * FROM addequ WHERE edate = ‘$currentDate’ “; //Sql query to find users that reminders dates match current date.
if($run1 = $dbcon->query($remind_query1))
{
$rows = $run1->num_rows;
for ($j = 0; $j < $rows; ++$j)//loop through each user in results and send a reminder email.
{
$run1->data_seek($j);
$row = $run1->fetch_array(MYSQLI_NUM);
$to = “[email protected]”; //gets the user email address
$subject = “Equipment Calibration Reminder”;
$message = “Hi “.$row[‘slno’].”n “.$row[‘ename’].” n Experied in “.$row[‘edate’].” n need to Calibrate here”;
$headers = “[email protected]”;
mail($to,$subject,$message,$headers);
}
}
?>