i'm working on a login script and therefore i needed to test something.
The thing is, what i like to test, doesn't seem to do what i want.
- Code: Select all
$_session['count'] += 1; //doesn't work
//$_session['count'] = $_session['count'] + 1; //this doesn't work either
echo "This is the ". $_session['count']. " time you've seen this page";
echo "This is session: ".session_id()."<br />\n";
The count stays on 1, but the session id keeps the same as it should. I expected the count going up when refreshing...
What am i doing wrong here ?