snowman15 Posted November 5, 2007 Share Posted November 5, 2007 Hey my cookie isnt working for some reason. php page to set cookie $user="hello"; setcookie("username", $user, time()+3600,"/"); page in the same directory that reads cookie: echo $_COOKIE["username"]; it just simply wont output anything. What am i missing? Link to comment https://forums.phpfreaks.com/topic/76013-solved-cookie-help/ Share on other sites More sharing options...
darkfreaks Posted November 5, 2007 Share Posted November 5, 2007 just do session_start(); $_SESSION['username']; less complicated than cookies Link to comment https://forums.phpfreaks.com/topic/76013-solved-cookie-help/#findComment-384739 Share on other sites More sharing options...
teng84 Posted November 5, 2007 Share Posted November 5, 2007 check if your cookie is not disabled Link to comment https://forums.phpfreaks.com/topic/76013-solved-cookie-help/#findComment-384741 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.