Hi all,
I am new to PHP. I have two pages login.php and index.php.
In login.php, a session is started if the user is authenticaed. The user's email is stored in a session variable, which should be accessible in index.php, but its' not being accessed.
Is this necessary to call session_register()? if it is then when should it be called?
below is the code
login.php
session.start();
$_session['email']='abc@xyz.com';
header('Location: index.php');
It redirects to index.php
index.php
if(isset['$SESSION['email']))
{
echo 'Email is:' . $SESSION['email'];
}
it is giving error saying "invalid index session.
please suggest me
}