register_globals *is* off (I haven't touched a global variable since _SESSION/POST/GET/REQUEST and the like were introduced), and what about this is "wrong behaviour"?
Mike Yasuo Ohgaki wrote: > Disable register_globals. Then it should work. > BTW, this is wrong behavior, but it's documented. > > -- > Yasuo Ohgaki > > Mike Eheler wrote: > >> Here's a test you can try yourself. >> >> On your server, set up these two files: >> >> test.php >> -------- >> <?php >> session_start(); >> if ($_REQUEST['var']) $_SESSION['var'] = $_REQUEST['var']; >> ?> >> <pre><?php print_r($_SESSION); ?></pre> >> <a href="test-unset.php">Click here to unset</a><br /> >> <a href="test.php?var=value">Click here to set</a> >> >> test-unset.php >> -------------- >> <?php >> session_start(); >> unset($_SESSION['var']); >> session_write_close(); >> header("Location: test.php")); >> exit(); >> ?> >> >> What's supposed to happen: You click on the set link, this sets the >> variable. You then click on the unset link. This loads another page >> which unsets the variable, saves the session, then returns you to the >> original page through a redirect. >> >> This does not happen. When you return to test.php, the _SESSION >> variable remains. Why? >> >> Mike > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php