Hi,
I have a fairly simple PHP question that's baffling me. I use time() to set a session variable so I can lock someone out after too many bad login attempts, but I'm getting a really strange result with my code ->
I keep getting numbers like -1182493278Code:$_SESSION["loginlocked"] = time(); echo time() - $_SESSION["loginlocked"];
If I echo them seperately I get correct integers e.g ->
1182493410 | 1182493278 which add up to to the correct number of seconds since the session was set.
Any idea why I'm getting the massive negative number when I do the subtraction???
Cheers,
Niggles




Reply With Quote