Sessions not working across pages...
Posted: Mon Dec 29, 2008 2:23 pm
I have tried everything... Lmme show you the code first:
This is page 1:
This is page.php:
Session works just fine for that one page.. Where it echoes. But on the second page it gives this error:Undefined variable: _SESSION.
I have tried everything.. I have been through documentation. I have just finished comparing my php.ini sessions part with the online defaults.. I have been through documentation. I have even changed my php version because I though the prob might be a bug or something in my version... Nothing Is Working... Kindly help me out here...
This is page 1:
Code: Select all
<?php
session_start();
$_SESSION['name']='dexter';
echo $_SESSION['name'];
?>
<a href="page.php">Go to this page</a>
Code: Select all
<?php
session_start();
echo $_SESSION['name'];
?>
I have tried everything.. I have been through documentation. I have just finished comparing my php.ini sessions part with the online defaults.. I have been through documentation. I have even changed my php version because I though the prob might be a bug or something in my version... Nothing Is Working... Kindly help me out here...