I am just starting to work with sessions. Here is the trouble I'm having.
I have a page with a form on it. The form posts to $PHP_SELF. When it posts I load the info into the $_SESSION array.
for example:
$SESSION['1'] = $POST['name'];
$SESSION['2'] = $POST['address']
So at then end of the page count($SESSION) returns 2. Now, if I fill out the form again and post again $SESSION seems to be emptied automatically.
In other words. If I post second time the values from the form do not overwrite the previous values because the previous values seem to no longer be there. Its as if I have $_SESSION=array(); somewhere, but I don't.
So, what is the problem? It seems as if the page is not refreshing so the original values in the $_SESSION array are not being passed forward.