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. Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/197189-cookie-not-setting/#findComment-1035305 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.