Hey, i'm looking fora script that can be used in age verification! I'm designing a beer distributers website and it needs age verification (21 years of age) on the front page! Could someone hook me up with a script to help me do this? The script needs to be something like the one on this site.. http://www.unitedstatesbeverage.com/ Thanks alot! -SMM
I'm leaving out a few basic steps only because it's late and I'm tired. If you need more specific help PM me. Here are the basics though. Stick the following in an include file: age_check.php session_start(); if (!isset($_SESSION['age'])) { header("Location: verifyage.php"); exit; }; PHP: Include age_check.php on all internal pages. Create a new page called verifyage.php <?php if ($_POST['btnSubmit'])) { $time=mktime(0,0,0,$month,$day,$year); if (time()-$time <= 662256000) { echo "You are too young"; exit; } else { session_start(); $_SESSION['age']=$time; header("Location: innerpage.php") }; }; ?> //Put your HTML form here PHP: