title: Send emails to members week before expiry
body: <p>I am build an app in php that sends an automatic email (using a cron job) to clients a week before their membership expires. Is there a way to just retrieve records from my database that are at least a week before expiring?</p>
  
  <p>I have done this:</p>
  
  <pre><code>$today = strtotime(date("Y-m-d"));
  
  $query = "SELECT first_name, last_name, email, renewal_date, membership_id FROM v_clients_members WHERE renewal_date &lt; '$today'";
  </code></pre>
  
  <p>then tried to refine it with </p>
  
  <pre><code>$today = strtotime(date("Y-m-d")+"1 week");
  
  $query = "SELECT first_name, last_name, email, renewal_date, membership_id FROM v_clients_members WHERE renewal_date &lt; '$today'";
  </code></pre>
  
  <p>I know my issue is the declaration of the $today but I have no clue on how to get today's date + a week.</p>
  
  <p>PS
  I know I should used prepared statements but its legacy code a clients wants me to use despite my objections. Also using a cron job because I will probably set it up so that every morning (2 - 3am) it does the database check and sends the emails.</p>