Re: Session troubles, could this be my isp's fault?
| From: | David Chamberlin | Date: | Wed, 26 Feb 2003 00:27:28 +0000 |
| Subject: | Re: Session troubles, could this be my isp's fault? | ||
| References: | 1 | Groups: | php.db php.db |
| Request: | Send a blank email to php-db+get-25921@lists.php.net to get a copy of this message | ||
Are you also doing a session_start() at the beginning of your second page? It needs to be in every script trying to use session variables.
-Dave
David Rice wrote:
I Have made two pages, "sess2.php" and "sess3.php" trying to create a session variable then access it in the other page. now when i try and call the session in the second page.... i get no value, and i have tried var_dump, and it gives me "NULL" anyone know if there is a reason for this?! page 1 is like this ================================================================= <? session_start();?> <html> <head> <title>Session Test</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <? session_register("name"); $_SESSION["name"] = "dave"; echo $_SESSION["name"]; ?> <br> <a href="sess3.php"> next </a> </body> </html> _________________________________________________________________ Surf together with new Shared Browsing http://join.msn.com/?page=features/browse&pgmarket=en-gb&XAPID=74&DI=1059