Re: two php scripts with same $_SESSION variables
| From: | Darren Whitlen | Date: | Thu, 24 May 2007 11:36:41 +0000 |
| Subject: | Re: two php scripts with same $_SESSION variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-255514@lists.php.net to get a copy of this message | ||
Jean-Christophe Roux wrote:
Hello, I have folder A with the following php script: <?php session_start(); $_SESSION['dummy']=10; echo $_SESSION['dummy']; ?> in folder B (same level as A), there is <?php session_start(); echo $_SESSION['dummy']; ?> when running the script in B, in can see the value 10. How can I make sure that the $_SESSION['dummy'] is not shared between the two scripts? I could change the name but that would not be convenient. Thank you ____________________________________________________________________________________ We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265Session vars are available for every script that is run after the session has started. If you want to stop the session for te remainder of the script, you can use session_write_close(). http://uk2.php.net/session Darren