[thelist] PHP: setCookie() error

Tom Dell'Aringa pixelmech at yahoo.com
Fri Jan 9 09:09:57 CST 2004


Hi,

I have a login script where I am setting a cookie. I wrote this some
time ago and I think PHP might have been updated since then, and now
it doesn't work. The line that borks is:

$aid   = $row["aid"]; <-- pulled from DB from username
setcookie("aid", $aid, "", "/");

Warning: setcookie() expects parameter 3 to be long, string given

Frankly I can't even remember what the 3rd parameter is for, but now
it throws this error. In the manual, nothing is stated to be a LONG
type parameter:

bool setcookie ( string name [, string value [, int expire [, string
path [, string domain [, int secure]]]]])


They are all strings or ints...confused...

Tom


=====
http://www.pixelmech.com/ :: Web Development Services
http://www.DMXzone.com/ :: JavaScript Author / Every Friday!
http://www.thywordistruth.net/ :: Eternal Life

[Those who say that I am finished, and am through, will have to run over my dead body to beat me...]


More information about the thelist mailing list