Hi all I was just trying to go through a tutorial on PHP sessions and it wouldn't work unless I turned on register_global. So I know that there are associated risks with turning on this option, here is the script I was running:
What in here made it necessary to turn that on? The $PHPSESSID? Any way is there a way to do sessions without turning on register_globals? Just thought I might ask.Code:<? session_start(); session_register("SESSION"); if (! isset($SESSION)) { $SESSION["count"] = 0; echo "<li>Counter initialized, please reload this page to see it increment"; } else { echo "<li>Waking up session $PHPSESSID"; $SESSION["count"]++; } echo "<li>The counter is now $SESSION[count] "; ?>
Thanx,
Ryan
Bookmarks