As extrange as can be, the echo function simply returns the following:

31536000);

but not the setcookie, $varname and $value parts... What's this? Do I havve
a missconfiguration in php.ini file?

Thanks,

Cesar Aracena

"Larry Brown" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> shouldn't $row[member_id] be $row['member_id'].  In case anyone can profit
> from this, when I find a function doesn't work right and I am using
> variables in its execution I run an echo/die combination immediately
before
> the function to verify the data being fed to it is as it should be.  In
this
> example...
>
> ...
> $id = $_SESSION["user"];
> echo "setcookie(\"memberlogin\", ".$id.", ".time() +60*60*24*365.");";
> die();
> setcookie...
>
> What does this yeild?
>
>
>
>
>
> -----Original Message-----
> From: Cesar Aracena [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 02, 2004 2:28 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] No cookie is being set?
>
>
> 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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to