Do you have a question? Post it now! No Registration Necessary. Now with pictures!
February 4, 2007, 6:09 pm
rate this thread
I validate a user and set a cookie woht the following sentence:
then I want to validate if the cookie is set with the following
sentence and it seems to enter in the "else", so the cookie was not
$result = mysql_query("SELECT * FROM usuarios WHERE nick='".
$HTTP_COOKIE_VARS["usNick"]."' AND password='".
Can anyone help me with this? I mena, setting the cookie correctly
Re: Problem to set a cookie
First of all: never, never, never, never save a password in a cookie.
Second: use $_COOKIE.
Third: the cookie will only be set for future request, this request was =
made without a cookie, so even if you set a cookie now it won't show up =
the $_COOKIE array automagically.
I suspect your more helped by just using sessions: