Quote:
Originally Posted by Feerick11
The session would of kept that alive
|
No it wouldn't. $stat would be forgotten as soon as the script ended.
To use a session, anything you want remembered between scripts must be put into the $_SESSION array. I've made this clear more than once to you yet you seem to do anything but accept it.
Quote:
Originally Posted by Feerick11
But now I have to use session variables. Is that correct?
|
No it's not correct. You've ALWAYS had to use session variables it's just that you have not been doing so. If you go back and read my previous replies you will see I have been telling you this multiple times.
Normal variables that you use (eg $User or $stat) were never remembered by sessions. They were available in other files that you might include() or require() but not between scripts on different urls and http calls.
Anything you want remembered between two scripts that are at different urls must go into the $_SESSION array. I've given you a basic code sample above so please use it! It isn't hard, just a call to session_start() in your script and then use the $_SESSION array just like any other array. It's really easy to do