Pass the value $this->_loginAttempts to the same page, assign it to $this->_loginAttempts and then increment it.
-Murugesan "jsWalter" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am trying to see how many times a person has tried to log in during a > session. > > the login script... > > $objAuth->start(); > > if ($objAuth->getAuth()) // is user logged in already > ...display hello page... > else > ...display login page > > OK, so far so good. > > If the user punches in anything wrong, the login gets displayed again. > > Now I want to track this iteration of attempts. > > In the START method, I did this... > > $this->_loginAttempts = $this->_loginAttempts + 1; > > then I added > > echo $objAuth->getLoginAttempts(); > > before ...display login page... to see how it tracks. > > It always displays '1' > > To me, it looks like '$objAuth->start();' , which is called each time the > page runs, which is each time a login attempt is made, is re-initializing > all the class vars to their default state. > > If I make _loginAttempts = 8, then it displays 9. > > So, my question (this time) is how do I get the class to track this counter? > > I hope I explained this well enough. > > I really don't think this is a PEAR::Auth specific question. I think it's > just a "how do I keep this counter going in a class" question. > > Thanks > > Walter > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php