session variables not staying

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

session variables not staying

Post by GeXus »

Any idea why session variables that are set on one page would not hold when being redirected to another page?

The odd thing, is it was actually working last night.. now all of the sudden its not. Basically all I have is session_start() at the top of both pages, and $_SESSION['username'] assigned to a value (a static value i tried while testing)... when I do a header redirect to the next page, this variable is empty.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Surprise! We've talked about it.. quite recently too. :D

search.php?search_keywords=session_writ ... uthor=feyd
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

Post by GeXus »

Nice! session_write_close did the job... thanks!!
Post Reply