PDA

View Full Version : cookies only set for the folder it is in, not for the entire site


Trusten
08-16-2002, 02:31 AM
what could cause this, or rather, what to do about this?

the simple

<?php
setcookie ("ck_username", $username);
setcookie("ck_password", $password);
?>

will only set for it's folder, and NOT for the entire site. If another folder checks for this cookie, it will not pick it up for some reason.

how can i fix this?

mordred
08-16-2002, 03:10 AM
I'll think you'll have to set the two optional parameters "domain" and "path" for the cookies if you want to access them site-wide.

Here some info about the cookie syntax:
http://wp.netscape.com/newsref/std/cookie_spec.html

And here how this is incorporated in PHP's setcookie function:
http://se.php.net/manual/en/function.setcookie.php

Trusten
08-16-2002, 05:06 AM
it's 12:00 am right now. i started reading those links at like 10:30.

i'm still no further than i was at 10:00.

any other 'simplier' help??

i'm pretty new at this.