Hey guy’s can somebody help a rusted coder…lol
i need to loop true the database and fid expired clients…
i have a date in my database. what i do is add 1 month to today’s date then substarct 3 days
and send a notification email saying the subscription is almost done time to renew.
[php]
$todayDate = date(“Y-m-d”);
$dateOneMonthAdded = strtotime(date(“Y-m-d”, strtotime($todayDate)) . “+1 month”);
$fiveDays = date (“Y-m-d”, strtotime ($today ."-3 days"));
//check if expired
$sql = ‘SELECT * FROM Client_Data’;
$result = mysqli_query($con, $sql);
if (mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result)) {
$ClientDate = $row[‘Date_registered’];
$dateOneMonthAdded = strtotime(date(“Y-m-d”, strtotime($ClientDate)) . “+1 month”);
$Client = $row[‘ClientID’];
$ClientE = $row[‘Email’];
foreach($Client as $main) {
if(($main[‘Date_registered’] == $fiveDays) );
}
///.............................
So i want to send the expired clients to a send email page(smtp)
but here i only send the last record found in database.
////.......................
echo "<meta http-equiv=Refresh content=1;url=send3.php?
ClientName=$Client&ClientEmail=$ClientE&Expire=$DatabaseDate>";
here sure i need a loop to creat an array and send the array to the send page right?
}[/php]