Forum Moderators: coopster
php Code:
setcookie( "id", "$userid", time()+3600, "/", false);
But on other pages like
url.com/member
I try this code:
php Code:
<?php
if (isset($_COOKIE["id"]))
echo "logged in";
else
echo "logged out";
?>
Even though I just signed in it still sends me "logged out"
setcookie("id", $userid, time()+3600); The setcookie() parameters are,
setcookie ( string name [, string value [, int expire [, string path [, string domain [, bool secure]]]]] )
I think you were missing the domain part, hence why it wouldn't set.