No cookie is being set?
| From: | Cesar Aracena | Date: | Fri, 02 Jan 2004 07:27:49 +0000 |
| Subject: | No cookie is being set? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-173627@lists.php.net to get a copy of this message | ||
Hi again,
I have the following code to first start a session and then write a
cookie... is that so hard? Well it is starting the session but the cookie is
not being set. see:
$row = mysql_fetch_array($result);
$_SESSION["user"] = $row[member_id];
if ($_POST["autologin"] == "yes")
{
$id = $_SESSION["user"];
setcookie("memberlogin", $id, time()+60*60*24*365);
header("Location: $CFG->wwwroot");
exit();
}
else
{
header("Location: $CFG->wwwroot");
exit();
}
What can it be? No error is posted.
Thanks in advanced,
Cesar Aracena