Re: I want a cookie!!!
| From: | MC_Gurk | Date: | Wed, 20 Dec 2000 18:56:30 +0000 |
| Subject: | Re: I want a cookie!!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31287@lists.php.net to get a copy of this message | ||
I had the problem that the cookier lived only during the session i used the
same ie for writing and reading the cookie. If you want to make a cookie
living a few days weeks or months, you should set all parameters: you have
not set the subdirectory parameter, it had never worked that way in my
scripts. Try to set it correctly to the subdir where your scripts resides.
setcookie("UQLogin[name]",$ACNAME,time()+31536000,"/Ur-Quan/","www218.l4.xod
ox.com");
this is a working example from one of my scripts. You see the slashes in
/Ur-Quan/ subdir? perhaps this is your mistake
MC_Gurk
"Police Trainee" <policetrainee@yahoo.com> wrote in message
news:20001216000334.20815.qmail@web1102.mail.yahoo.com...
> for the love of god, will someone please explain why:
> <?
>
> setcookie("acookie","avalue",time()+6000,"/",".mydomain.com",0);
> ?>
> will not set a cookie!!! If I do not include the "/"
> and the ".mydomain.com" and the 0, then it works
> perfectly fine. But with the above, it doesn't work at
> all. I am trying to set this cookie from a file in a
> subdirectory of /
> I have tried changing "/" to "/subdirectory", i've
> tried ".mydomain.com" "mydomain.com",i've tried a 1
> for a 0. nothing works. lol. and i know it's probably
> some stupid little thing too.
>
> the ultimate goal: set a cooking with the file in the
> subdirectory that can be accessed when called from any
> file in the domain.
>
> Thank you sooooooo much. How did you people get so
> good at PHP? I've read the manuals and online
> tutorials like crazy and I STILL suck at it and I can
> tell I will never "master" it. lol. I haven't even
> TOUCHED mysql yet. I'll wait a few years for that one!
>
> -mark
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Thousands of Stores. Millions of Products.
> http://shopping.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>