If it exists, I want to increment it. If it doesn't, I want to create it. Sounds simple right?
Code: Select all
if (!isset($attempt_count)) {
session_register("attempt_count"); //Counter for shutting down a user after too many login attempts. UNregistered with a successful login
$attempt_count ++;
}Every time I test this code, is always re-defines $attempt_count and erases the previous values. It's not supposed to do that is it. I 'thought' that session_register() left a variable alone if it was already defined. Does it in-fact re-initialize it?
I even tried
Code: Select all
if (!isset($_SESSION[attempt_count]))-------------
Also, the $attempt_count ++; does not seem to work on my main server. I didn't have a problem with it on my local test server, but uploading the script to the main server causes it not to function. I have tried all variations located on the PHP online manual. But, nothing explains why it craps out on the web server.
Any ideas on either of these problems?
Thanks,