Creating a warning page in php

Discussion in 'PHP' started by buju, Jun 6, 2008.

  1. #1
    Can somebody please tell me what needs to be done to add an adult content warning to a php index page? I want to present the warning page in the index file and if the visitors clicks enter then set a cookie so the warning page will not be shown to him again.
     
    buju, Jun 6, 2008 IP
  2. Agent_Smith

    Agent_Smith Well-Known Member

    Messages:
    890
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    145
    #2
    Basically,

    In the index, or on any other page of your site, check if your specified cookie exists. If it doesn't, do a redirect to your warning page. Of which, they will have to accept. When they do, create a cookie using your PHP. So then they can access their other pages and it won't redirect them, as they have the cookie.
     
    Agent_Smith, Jun 6, 2008 IP