landing page to verify age

Discussion in 'HTML & Website Design' started by onlinestudio, Jan 7, 2008.

  1. #1
    Hey guys how would I make one of those pages that comes up when someone tries to access the site "you must be this old to enter... verify"
     
    onlinestudio, Jan 7, 2008 IP
  2. AYCOM

    AYCOM Peon

    Messages:
    33
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    On your main index.php file have a form where people enter their age. Then have that post back to index.php and have it check in PHP whether or not the age is greater than 18 and if so, set a session variable called "VERIFIED" to true, then do a header redirect to the main page of your site, and if not it will display an error saying you must be 18 to enter.

    Then on all the other pages of your site have a few lines of PHP checking to see if the session variable "VERIFIED" is true and if not then do a header redirect back to index.php.

    Make sure the PHP code checking the sessions variables and checking the age is at the VERY TOP of your pages before any other HTML code.

    That help?
     
    AYCOM, Jan 7, 2008 IP
  3. onlinestudio

    onlinestudio Peon

    Messages:
    237
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yea... a bit over my head but I can figure it out... How or where do I make the form? Sorry for my ignorance
     
    onlinestudio, Jan 7, 2008 IP
  4. t.sealey

    t.sealey Peon

    Messages:
    110
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    t.sealey, Jan 7, 2008 IP