NYCPHP Meetup

NYPHP.org

[nycphp-talk] why does setcookie fail?????

Phil Powell soazine at erols.com
Sat Sep 6 16:43:48 EDT 2003


Well this is how I solved it:

if ($hasLoggedIn && ($row = mysql_fetch_row($query)) {
 setcookie('nordicnet_registration', $row[0], 0, '/');
 ...
}

That works!! Apparently the problem was neither setcookie nor header, AND it
was BOTH!

Figure that one out, geniuses!!! ;)

Phil
----- Original Message ----- 
From: "Brian Pang" <bpang at bpang.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Saturday, September 06, 2003 4:38 PM
Subject: Re: [nycphp-talk] why does setcookie fail?????


> it's quite possible that $row['nnet_user_registrationnumber'] null, but
> my cookie was set with a value of
> {}
>
> which is not null, though probably not what was expected.
> but would indicate that the var was null/empty/undefined/false
>
> > 2. I suspect the real problem is that
> > $row['nnet_user_registrationnumber'] is null. That would definitely
> > make the browser discard the cookie.
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list