adam84 Posted March 20, 2007 Share Posted March 20, 2007 This is my code for setting a cookie, but for some reason it is not getting set. Any questions? function login($userID, $userNameVal, $remember){ $this->userid = $_SESSION['userid'] = $userID; $this->userName = $_SESSION['userName'] = $userNameVal; $this->logged_in = $_SESSION['logged_in'] = true; $t = time()+(60*60*24*100); if($remember){ setcookie("cookname", $userNameVal, $t ,"/"); setcookie("cookid", $userID, $t, "/"); } } Quote Link to comment Share on other sites More sharing options...
per1os Posted March 20, 2007 Share Posted March 20, 2007 is $remember being set. Also is this on localhost? If so see this: http://www.aeonity.com/frost/php-setcookie-localhost-apache Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.