Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Richard Lynch
On Thu, October 6, 2005 9:11 am, Brian Dunning wrote: > I'm trying to setcookie('username',$username,15552000) but on > subsequent pages $_COOKIE('username') is always null. > > I verified that I'm setting it before any other output is sent to the > browser. I verified that $username does have some

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Brian Dunning
D'Oh! You guys are absolutely right. I was trying to go for 6 months, which works now if I say time()+15552000 instead of 15552000. And the documentation shows that exactly - apparently I read right over it, even though I studied it minutely before posting. Oh well...my wife would have the

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread tg-php
Good catch, Chris. I was wondering about that myself but hadn't taken the time to see if setcookie() used regular serial time or if cookies had another time standard. echo date("m/d/Y h:i:s", 15552000); 06/29/1970 08:00:00 That's what I get. -TG = = = Original message = = = Unless I'm mist

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Chris
Unless I'm mistaken, you appear to be setting the Expiration date of the cookie to "Mon, 29 Jun 1970 17:00:00 -0700". Which would cause the cookie to be unset, if it were already set, and do nothing otherwise. Chris Brian Dunning wrote: I'm trying to setcookie('username',$username,15552000)

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Brian Dunning
On Oct 6, 2005, at 7:28 AM, John Nichel wrote: Is that just a typo? It should be $_COOKIE['username'] Oops, yes, that was my typo in the email - it is correctly $_COOKIE ['username'] in the code. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.ph

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread John Nichel
Brian Dunning wrote: I'm trying to setcookie('username',$username,15552000) but on subsequent pages $_COOKIE('username') is always null. Is that just a typo? It should be $_COOKIE['username'] -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List

Re: [PHP] setcookie() is not my friend

2005-10-06 Thread Larry E. Ullman
I'm trying to setcookie('username',$username,15552000) but on subsequent pages $_COOKIE('username') is always null. I verified that I'm setting it before any other output is sent to the browser. I verified that $username does have some valid contents. I also verified that the browsers I'm t

[PHP] setcookie() is not my friend

2005-10-06 Thread Brian Dunning
I'm trying to setcookie('username',$username,15552000) but on subsequent pages $_COOKIE('username') is always null. I verified that I'm setting it before any other output is sent to the browser. I verified that $username does have some valid contents. I also verified that the browsers I'm t