Problem to set a cookie
- From: "zek2005" <esapoznik@xxxxxxxxx>
- Date: 4 Feb 2007 10:09:49 -0800
Hi!
I validate a user and set a cookie woht the following sentence:
setcookie("usNick",$nickN,time()+7776000);
setcookie("usPass",$passN,time()+7776000);
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
established.
if(isset($HTTP_COOKIE_VARS["usNick"]) &&
isset($HTTP_COOKIE_VARS["usPass"]))
{
$result = mysql_query("SELECT * FROM usuarios WHERE nick='".
$HTTP_COOKIE_VARS["usNick"]."' AND password='".
$HTTP_COOKIE_VARS["usPass"]."'");
}
else
{
setcookie("usNick","x",time()-3600);
setcookie("usPass","x",time()-3600);
}
Can anyone help me with this? I mena, setting the cookie correctly
Regards,
Ezequiel
.
- Follow-Ups:
- Re: Problem to set a cookie
- From: Rik
- Re: Problem to set a cookie
- Prev by Date: Re: I have sub-categories but want to display full category path
- Next by Date: Re: Problem to set a cookie
- Previous by thread: Problem inserting a function - Easy question
- Next by thread: Re: Problem to set a cookie
- Index(es):
Relevant Pages
|