News

Log In Sponsors
Partner Sites




Re: Hide div using cookie if page has been already loaded today?



I would suggest using PHP for this. That way, if the user is new it can be generated on the spot. If not, then it will not be executed in the html and just be hidden. [code:1hg9jbu4] if( isset($_COOKIE['myCookie'])){ //Nothing will happen because the Cookie is set. If not it will go to else: }else{ echo <div class="myDiv">This content only appears if the Cookie called myCookie is set in the user's browser.</div> } [/code:1hg9jbu4] Something like that should work before your headers are loaded.

Click here to read the whole forum topic






cron