Pls i need your help here, im working on web page in which i want the user who register or subscribe will login to know thier status either membership expired or active but this code it is working manually if i set the date but not working from the database and in my database i have a data table column called expired with timestramp
<?php
$now = time();
$sql="SELECT * FROM `user` WHERE (`username` ='$myusername' OR `lastname` ='$myusername') AND `password`='$mypassword';
$expired=date("Y-m-d H:i:s", time());
//echo $now_time."<br>";
$today_date=strtotime($now_time);
$d1_register=strtotime("2015-10-01 18:46:38");
$mint=round(abs($today_date - $d1_register) / 60,2)." minute";
$day=round(($mint/60)/24,2);
if ($day>=30) {
echo "Account Expired";
} else {
echo "Welcome Back!";
}
?>