note 68161 rejected from function.setcookie by betz

From: Date: Sun, 16 Jul 2006 11:16:34 +0000
Subject: note 68161 rejected from function.setcookie by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-114814@lists.php.net to get a copy of this message
Note Submitter: denito19 at gmail dot com ---- Please, if somebody can help me... thanks! BTW: I'm new at the whole cookie thing, I've been programming, for 7 years now, I'm better in Visual Basic and stuff like that... Well, I'm doing it all separate, because of the whole headers thing... I have a page called procesos.html in which I have a form, the value of username and password are asked there.. Then I pass those values to another .php that takes charge of the MySql instructions, then if it all works fine it goes to a third page in which I set the cookie Then I go back to procesos.html and it shows, username = "user" but when I click any of my others links It goes blank again as if no cookie had been set.. but if I go back to the page it's back again, even if I reload it, it's back again This is the Check.php that does the mysql instructions $queryupdate = "select * from users where nombre = '$nombre' and clave = '$clave'"; $resultupdate = mysql_query($queryupdate); $numberupdate = mysql_numrows($resultupdate); $tipo= mysql_result($resultupdate,0,"tipo"); if ($numberupdate==1) { redirect("enter.php?nombre=$nombre&tipo=$tipo"); }else{ redirect("procesos.html"); } Then it goes to enter.php setcookie("name", $nombre,time()+3600, "/"); setcookie("acepto", 1,time()+3600, "/"); setcookie("tipo", $tipo,time()+3600, "/"); I've tried with no time, and no path, it doesn't work... :S It worked until I added the MySql thing... I mean, with a username variable, and a password variable it worked.. something like this, If ($name = "user" && $password ="1234") then go in, and it worked fine If somebody can help me I greatly appreciate it!!!!

« previous php.notes (#114814) next »