maxudaskin Posted September 12, 2007 Share Posted September 12, 2007 Would this be ok? <?php if(isset($_COOKIE['vzoom_display'])) { header( 'Location: index_2.php' ) ; }else{ ?> <html> [tt]Some HTML COde Here[/tt]</html><?php } ?> I want it to show the page unless the guest/user has previously clicked 'do not show this page again'. I know it set the cookie because I made a script to view the cookie, it is there, but it won't skip the page... Quote Link to comment https://forums.phpfreaks.com/topic/68946-solved-cookie-question/ Share on other sites More sharing options...
kireol Posted September 12, 2007 Share Posted September 12, 2007 looks good to me, other than that open curly brace at the end bugs the anal side of me. I say the cookie isnt set. see if this does anything. add it at the top echo $_COOKIE['vzoom_display']; Quote Link to comment https://forums.phpfreaks.com/topic/68946-solved-cookie-question/#findComment-346577 Share on other sites More sharing options...
maxudaskin Posted September 12, 2007 Author Share Posted September 12, 2007 I did... Quote Link to comment https://forums.phpfreaks.com/topic/68946-solved-cookie-question/#findComment-346579 Share on other sites More sharing options...
kireol Posted September 12, 2007 Share Posted September 12, 2007 and it echoed a value? Quote Link to comment https://forums.phpfreaks.com/topic/68946-solved-cookie-question/#findComment-346582 Share on other sites More sharing options...
maxudaskin Posted September 12, 2007 Author Share Posted September 12, 2007 I changed it to if($_COOKIE['vzoom_display']=="no") It didnt work the first time because I did not use the quotations... Quote Link to comment https://forums.phpfreaks.com/topic/68946-solved-cookie-question/#findComment-346583 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.