[Solved] how can i make a countdown timer that goes past the 60minutes
The current minute is never an issue. You are concerned with the duration since last blocked, not with “what time was that”: block_user.php: <?php $now = new DateTime(); write_block_into_database($ip_address, $now->format(‘Y-m-d H:i:s’)); ?> check_block.php <?php $sql=”SELECT 1 FROM sometable WHERE ip_address=? AND DATE_ADD(blocked_at, INTERVAL 1 HOURS) >= NOW()”; if(get_result($sql, $ip_address)) { // this address is blocked … Read more