The variable will never be more than itself :) ($variable
will never equal $variable + something
)
Make sure $timer
is put outside of the validation (the if statement) and check against current time.
Something like this:
$originalTime = time();
if (isset($_POST['generate'])) {
if (time() > $originalTime + 60) {
// do your stuff
}
}
EDIT: you actually will have to either add the $originalTime
to a session variable or to a cookie and check against it on the next page. But the logic is the same: you will have to separate the original time from the time you're checking on post.