Hello all,
I have problem with session variables handling.
Follwoing are the steps, I am doing for defining, passing and handling within my various programs.
Details begin here :
XXXXXXXXXX
In one form, the username and password are valid or not. If these are correct, then I do :
session_register("ses_memberid");
$_SESSION["ses_memberid"] = $row[member_id];
By this I am trying to define session variable.
From this program, the user gets redirected to another program.
In this second program, at the beginning I do :
if(!session_is_registered("ses_memberid"))
{
header("location:restrict.php");
}
else
{
// the required code.
}
Here, the control goes in the "ELSE PART". But if I try to "echo" the session variable value OR try to use it in the query formation, then it does show the value nor the value gets replace in the query.
XXXXXXXXXX
Details begin here :
I would like to get the help from members to overcome this problem. Am I doing something wrong OR the method is not correct ?
Waiting for reply.
thanks in advance.
regards,