Page 1 of 1

Problem with Cookies

Posted: Wed Jul 19, 2006 11:28 am
by aetoc
I set the setcookie("lightbox", "bret", time()+604800, "/", "skata"); in index.php but it dosn't work.

I't dosn't do enything.

Someone HEEEEEEEEELP me please.

Posted: Wed Jul 19, 2006 11:30 am
by Ward
Try removing the domain, and see if that helps. Also, are you calling setcookie() before *any* output has been sent to the browser?

Code: Select all

setcookie("lightbox", "bret", time()+604800, "/")

Posted: Thu Jul 20, 2006 2:32 am
by aetoc
Thanks man. It works.

Now I have an other problem.

The cookie that has bean created is caled server_user@192.168.100.txt (local server)

How can I read the data?

Thanks man.

Posted: Thu Jul 20, 2006 2:37 am
by RobertGonzalez
$_COOKIE['lightbox'];

Posted: Thu Jul 20, 2006 3:27 am
by aetoc
Thanks both of you.

You get me out of BIG truble