CliffLandin
Programmer
I am having an issue reading the value from a cookie that I had no problem reading in an earlier page. I have a sign in page that sets a cookie when you sign in. If you then return to the sign in page during the session it will redirect you to the next page, no sign in required.
The cookie holds the value of the users name and I would like to read from it on other pages. It works fine on the signin page, but doesn't want to work after that.
here is how I am setting the cookie and reading the cookie:
SETTING THE COOKIE:
else{
setcookie("tlconc",$user, 0, "/");
header("Location: }
READING THE COOKIE:
$user = $_COOKIE["tlconc"];
Like I said, the first time that I read it it works fine but then nothing. What am I doing wrong?
Thanks for any help that you can offer.
When in doubt, go flat out!
The cookie holds the value of the users name and I would like to read from it on other pages. It works fine on the signin page, but doesn't want to work after that.
here is how I am setting the cookie and reading the cookie:
SETTING THE COOKIE:
else{
setcookie("tlconc",$user, 0, "/");
header("Location: }
READING THE COOKIE:
$user = $_COOKIE["tlconc"];
Like I said, the first time that I read it it works fine but then nothing. What am I doing wrong?
Thanks for any help that you can offer.
When in doubt, go flat out!