Re: Unsetting $_SESSION variables?

From: Date: Fri, 02 May 2003 14:55:45 +0000
Subject: Re: Unsetting $_SESSION variables?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-146131@lists.php.net to get a copy of this message
On Friday 02 May 2003 22:27, Jeff Lewis wrote: > Sorry, forgot to put that I had that and same with $_SESSION = array(); > > It's very odd...I searched for information on the Zeus server in case there > were issues but couldn't find anything on this either. Does this work? <?php session_start(); echo '<a href="' . $_SERVER['PHP_SELF'] . '">reload</a>'; echo '<form method="post"><input type="submit" name="submit" value="UNSET"></form>'; if (isset($_POST['submit'])) { unset($_SESSION['doo']); echo "reset<br>"; } if (isset($_SESSION['doo'])) { echo $_SESSION['doo']++; } else { echo '$_SESSION[\'doo\'] is not set so we will make it zero'; $_SESSION['doo'] = 0; } ?> -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Abstainer, n.: A weak person who yields to the temptation of denying himself a pleasure. -- Ambrose Bierce, "The Devil's Dictionary" */

« previous php.general (#146131) next »