but im not understanding if this is correct one, if this line : intval(($today-$last)/86400)+1; is for 24h !
please someone check it and if is wrong correct for me
Code: Select all
function checkLastclick($lastclicked){
$needclicking = 0;
$last = strtotime($lastclicked);
$today = strtotime("now");
$numdays=intval(($today-$last)/86400)+1;
if($numdays>=2){
$needclicking = 1;
}
return ($needclicking);
}