<?php
//first start with a MySQL query to gather the rows to send an email
//this is for 30 days but you can adjust the numbers for each case
$30_day_query = "SELECT * FROM users WHERE reminder = 1 AND date
BETWEEN DATE_SUB(NOW(),INTERVAL 29 DAY) AND DATE_SUB(NOW(), INTERVAL 30 DAY)";
$execute = mysql_query($30_day_query);
while($row = mysql_fetch_array($execute)){
//get info of user
$name = $row['name'];
$email = $row['email'];
//send the email however you want
}
//repeat for the rest of the reminder options
?>
If you run this in a daily cron job, you will not send duplicate emails.