I need to have a validation that checks if the "last_update" is done before 3 hours or less.
I have this PHP code:
if($user['last_update'] < strtotime("3 hours")) {
$msg .= "You can only register every 3 hour.";
}
How could this be done?
I need to have a validation that checks if the "last_update" is done before 3 hours or less.
I have this PHP code:
if($user['last_update'] < strtotime("3 hours")) {
$msg .= "You can only register every 3 hour.";
}
How could this be done?
If $user['last_update']
is in date format, then
if (time() - strtotime($user['last_update']) < 3 * 3600) {
//..
}