On Wed, 2004-08-25 at 14:34, Shaun wrote: > I am writing a shopping cart and am using a session called > $_SESSION["orderinfo"] to store the order information. I also have a > function I use to clear the session when the payment has been authorized: > > function clear_orderinfo() { > global $_SESSION; > unset($_SESSION["orderinfo"]); > } > > However this function doesnt seem to work and the session remains active, is > there another way to clear a session?
You do have a session_start() somewhere, right? Also, $_SESSION, like $_GET, $_POST et. al. are automatically global, you don't need to specify global $_SESSION. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php