PHP how do I set the date to one week in advance?
<p>I have the day and the month from the database, stored in seperate variables. But if today is the 7th and I minus one week, it would be 0 same case for the month. And I want to add the <code>lo_date</code> to <code>lockin_period_date</code> and minus 3 months, as I want it to send an email to me 3 months in advance. How do I set the values I have from the database to the date I want? Please help. </p>

<pre><code>&lt;?php
include"connect_mysql.php";
$reminder_dates = mysql_query("SELECT*FROM registration_form");
while($row = mysql_fetch_array($reminder_dates)){
$main_dob_day = $row['main_dob_day'];
$main_dob_month = $row['main_dob_month'];   
$main_dob_year = $row['main_dob_year'];

$joint_dob_day = $row['joint_dob_day'];
$joint_dob_month = $row['joint_dob_month'];
$joint_dob_year = $row['joint_dob_year'];

$loan_lo_day = $row['loan_lo_day'];
$loan_lo_month = $row['loan_lo_month'];
$loan_lo_year = $row['loan_lo_year'];

$lockin_period_day = $row['lockin_period_day'];
$lockin_period_month = $row['lockin_period_month'];
$lockin_period_year = $row['lockin_period_year'];

$legal_fee_clawback_day = $row['legal_fee_clawback_day'];
$legal_fee_clawback_month = $row['legal_fee_clawback_month'];
$legal_fee_clawback_year = $row['legal_fee_clawback_year'];     

date_default_timezone_set('UTC');   

$m = date("n"); 
$d = date("j"); 
$y = date("Y");
$time = time();
$today = date('n-j-Y', $time);


//main applicant birthday - reminder 7days in advance
$main_day = $main_dob_day-7;
if($main_day == $d &amp;&amp; $main_dob_month == $m){
echo "Mail Sent!";  
}
//

}
?&gt;
</code></pre>
