squiblo Posted April 1, 2010 Share Posted April 1, 2010 I have a page called 'change_language.php' and all that is in the page is this.... $lang = $_GET['lang']; setcookie('language',$lang,time()+86400); if (isset($_COOKIE['language'])) header('location: http://localhost/'); the page does redirect suggesting that the cookie has been set because of the if statement, but when I get to the redirected page I test if the cookie has been set by putting... echo $_COOKIE['language']; and nothing is echoed suggesting the cookie has not been set. Link to comment https://forums.phpfreaks.com/topic/197189-cookie-not-setting/ Share on other sites More sharing options...
squiblo Posted April 1, 2010 Author Share Posted April 1, 2010 It seems so simple (probably is) but I cant find what is wrong Link to comment https://forums.phpfreaks.com/topic/197189-cookie-not-setting/#findComment-1035305 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.