Search found 6 matches
- Fri Nov 13, 2009 9:39 am
- Forum: PHP - Code
- Topic: $_SESSION sanity check
- Replies: 10
- Views: 1152
Re: $_SESSION sanity check
So it's like an additional safety mechanism so you don't/can't access $_SESSION variables outside of the code blocks where you intended to access them? All that means is you'd need another session_start() to access them, right?
- Thu Nov 12, 2009 11:47 pm
- Forum: PHP - Code
- Topic: $_SESSION sanity check
- Replies: 10
- Views: 1152
Re: $_SESSION sanity check
Got it, thanks!!! Now just to nail down proper logout and make sure protected pages are actually protected 
- Thu Nov 12, 2009 10:33 pm
- Forum: PHP - Code
- Topic: $_SESSION sanity check
- Replies: 10
- Views: 1152
Re: $_SESSION sanity check
Uhoh... I was ASSuming that by including a file it essentially just inserted code from an external file wherever the include statement was. I figured it was mainly for cleaning up code and stuff - didn't realize it would need session_start(), too! Let's see how it goes... PS What about session_write...
- Thu Nov 12, 2009 9:51 pm
- Forum: PHP - Code
- Topic: $_SESSION sanity check
- Replies: 10
- Views: 1152
Re: $_SESSION sanity check
Why might this sample code (below) work when my own code (above) doesn't? Aren't I doing the same thing??? <?php // page1.php session_start(); echo 'Welcome to page #1'; $_SESSION['favcolor'] = 'green'; $_SESSION['animal'] = 'cat'; $_SESSION['time'] = time(); // Works if session cook...
- Thu Nov 12, 2009 6:06 pm
- Forum: PHP - Code
- Topic: $_SESSION sanity check
- Replies: 10
- Views: 1152
Re: $_SESSION sanity check
I removed session_write_close() but it's still broken 
- Wed Nov 11, 2009 11:40 pm
- Forum: PHP - Code
- Topic: $_SESSION sanity check
- Replies: 10
- Views: 1152
$_SESSION sanity check
Ok ladies and gents, I've been battling with this login/session code for a few days now and I'm beginning to think there's a short circuit... somewhere in my head. No matter what I've tried I can't maintain persistent session across pages. Can someone please give me a second/third/fourth set of eyes...