saeed_violinist Posted December 14, 2006 Share Posted December 14, 2006 Dear friends,Im trying to make a pop-up in my page. I done it fine and pop-up "floating layout" is displaying fine. I just want that my users see this pop-up once a week (time is not so important but not less than a day pls!) .I know it must be done with help of cookies and a if statement ...please help me do this.I mean something like this :if (new user) {show pop-up } else { dont show!}thanks Quote Link to comment Share on other sites More sharing options...
SharkBait Posted December 14, 2006 Share Posted December 14, 2006 So something like:[code]<?phpif(isset($_COOKIE['myCookie'])) { ShowPopUp();}?>[/code][/code] Quote Link to comment Share on other sites More sharing options...
saeed_violinist Posted December 14, 2006 Author Share Posted December 14, 2006 thanks, I dont have created any cookie myself until now, I want to try it myself now. if I cant sucess or I sucess I will write it here ;D Quote Link to comment Share on other sites More sharing options...
saeed_violinist Posted December 14, 2006 Author Share Posted December 14, 2006 hey Im cool :d[code]<?phpSetCookie("popupshown", "yes", time()+ 3600);if (!isset($_COOKIE["popupshown"])) { ShowPopUp()}?>[/code]Works great! Quote Link to comment Share on other sites More sharing options...
saeed_violinist Posted December 14, 2006 Author Share Posted December 14, 2006 ok, but is there a better way to do this job ? Quote Link to comment 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.