Hello,
I use session as the following. But the session value disappear in main.php. What's the problem ?
$_SESSION["SESSION_TIMESTAMP"] = time();
header("Location:main.php");
Why does the session value disappear ?
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Sessions setting can be short circuited if you redirect. Try adding a call to session_write_close().