Hello,
What I am trying to do is restrict access to something if 48 hours hasn't passed since the last access.
I have a MySQL table with the last access time (col name: lastAccess).
If they are within the 48hours, deny access and tell them how many hours and minutes until they can access it again, otherwise, let them through,
Here is my not-working code.
$q = mysql_query("SELECT lastAccess FROM access");
$a = mysql_fetch_array($q);
$access = $a['lastAccess'];
if(strtotime("+48 hours", $access) >= time()){
echo "Access Granted";
}else{
echo "No Access! You have __ hours and __ minutes left.";
}
Thank you in advance for your help.
-- Turt2Live