Portal Home > Knowledgebase > Articles Database > Easiest way to make a warning page first in php?
Easiest way to make a warning page first in php?
Posted by lexington, 07-23-2009, 10:50 AM |
Hello, could anyone please provide a working php example of a page that will display with a warning, and the user has to click a button to continue. Then this value can be stored in a session so that the next time they visit the site their option will be saved and they can just go to the page right away without the warning message? Thanks
|
Posted by ThatScriptGuy, 07-23-2009, 11:56 AM |
Cookies are probably the best way to accomplish this. Just setcookie() to expire far in the future. On page load, check for cookie. If it exists, redirect to content. If it doesn't, show warning.
|
Posted by cselzer, 07-23-2009, 01:10 PM |
has to be a cookie, because sessions expire after the browser has been closed.
grats on post 2k
|
Posted by ThatScriptGuy, 07-23-2009, 01:14 PM |
Eek...I need to get to work.
|
Add to Favourites Print this Article
Also Read