How can I compare two dates in PHP?

If all your dates are posterior to the 1st of January of 1970, you could use something like: $today = date(“Y-m-d”); $expire = $row->expireDate; //from database $today_time = strtotime($today); $expire_time = strtotime($expire); if ($expire_time < $today_time) { /* do Something */ } If you are using PHP 5 >= 5.2.0, you could use the DateTime … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)