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.


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();?>
<title>Session Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

$_SESSION["name"] = "dave";
echo $_SESSION["name"];
<a href="sess3.php"> next </a>

Surf together with new Shared Browsing

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to