robertallen Posted November 26, 2012 Share Posted November 26, 2012 Hi all, I'm new to the forums and fairly new to PHP. I am glad I found you guys. Does anyone know of a simple script that after someone signs up for a mailing list that it will store a cookie that hides the mailing list completely? (Display none?) This is an external mailing list, (through the InfusionSoft) engine, but hopefully just a simple toggle of the "Sign Up Now" on our web site can just set a cookie to hide the DIV tag. Is this possible? Quote Link to comment https://forums.phpfreaks.com/topic/271169-hiding-a-div-cookie/ Share on other sites More sharing options...
Muddy_Funster Posted November 26, 2012 Share Posted November 26, 2012 I think there may bee some confussion as to what a cookie is and does. Cookies are stored, normaly, on the end users computer and cached within the browser. They are passed in the page headers, they arn't visible by default in the body of the page. What exactly are you trying to do? Quote Link to comment https://forums.phpfreaks.com/topic/271169-hiding-a-div-cookie/#findComment-1395128 Share on other sites More sharing options...
robertallen Posted November 26, 2012 Author Share Posted November 26, 2012 We have two blocks of content that contain mailing list forms (one is on the sidebar, and the other is in the body copy of the page) on a Wordpress system. When the user clicks submit after they input their information on the mailing list forms we want to be able to hide them from now on on their side every time they visit the site. I was thinking a cookie would do this. Quote Link to comment https://forums.phpfreaks.com/topic/271169-hiding-a-div-cookie/#findComment-1395176 Share on other sites More sharing options...
Christian F. Posted November 26, 2012 Share Posted November 26, 2012 If the user has to register to see the page, then you could just write a flag to the database. If not, then I recommend looking into the PHP manual for setcookie (). Quote Link to comment https://forums.phpfreaks.com/topic/271169-hiding-a-div-cookie/#findComment-1395186 Share on other sites More sharing options...
robertallen Posted November 26, 2012 Author Share Posted November 26, 2012 Ah okay, so it's not just a simple fix. Unfortunately it's an external database so I won't be able to manipulate it (the mailing list is through InfusionSoft). Thank you very much. Quote Link to comment https://forums.phpfreaks.com/topic/271169-hiding-a-div-cookie/#findComment-1395188 Share on other sites More sharing options...
Christian F. Posted November 26, 2012 Share Posted November 26, 2012 I was thinking about adding a flag to the local users table, not the mailing list database. Also, did you check out the link I posted? Quote Link to comment https://forums.phpfreaks.com/topic/271169-hiding-a-div-cookie/#findComment-1395197 Share on other sites More sharing options...
robertallen Posted November 26, 2012 Author Share Posted November 26, 2012 I did. I'm still new to it all, so I need to play around with it then. Thank you for the link, that will help me tremendously. Quote Link to comment https://forums.phpfreaks.com/topic/271169-hiding-a-div-cookie/#findComment-1395201 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.