I am not sure where to begin setting up an automatic recurring email reminder app. I currently have a form that inserts data into a msyql database.
<form method="post" action="save.php">
<p>
<label for="name">Full Name</label><br />
<input type="text" name="name" data-h5-errorid="error-name" required />
<span id="error-name" class="error">Please enter a full name</span>
</p>
<p>
<label for="address">Address (Street Address Only)</label><br />
<input type="text" name="address" data-h5-errorid="error-address" required />
<span id="error-address" class="error">Please enter an address</span>
</p>
<p>
<label for="email">Email</label><br />
<input type="email" name="email" data-h5-errorid="error-email" required />
<span id="error-email" class="error">Please enter a valid email address</span>
</p>
<p>
<label for="date">Date of Service</label><br />
<input id="date" type="text" data-h5-errorid="error-service" name="date" required />
<span id="error-service" class="error">Please choose a date</span>
</p>
<p>
<label for="reminder">Reminder</label><br />
<select name="reminder">
<option value="1">30 Days</option>
<option value="2">60 Days</option>
<option value="3">Semiannual</option>
<option value="4">Annual</option>
</select>
</p>
<p>
<label for="notes">Notes on Service</label><br />
<textarea name="notes" rows="15"></textarea>
</p>
<p>
<input type="submit" value="Submit" />
</p>
</form>
I am storing all fields in the database and have that working properly using http://medoo.in/. How do I go about creating a PHP script to send a recurring email based on the Service Date and the selected Reminder (every 30 days, 60 days, semianually, annually)? I was thinking of using PHP mailer to send the actual emails and running a daily cron job.