I currently have this code in my login script to check if the users subscription is in date:
// get the current date
$now = date("Y-m-d");
if ($user_id['enddate'] < $now) {
?>
<p>your Licence is out of date</p>
<?php
}
else
{
?>
<p>your licence is in date</p>
<?php
}
The value storing the expiry date is 'enddate'.
It just goes straight to the out of date message, whether the user has a subscription in date or not. I can't get my head around it.
The MYSQL field for enddate is just type 'date', and is generated from the registration script:
$enddate = date("Y-m-d", strtotime("+ 365 day"));
Any ideas? I know i'm working in depreciated MYSQL, but I need to for this project.
Cheers