deebler Posted October 10, 2011 Share Posted October 10, 2011 Hi - I'm fairly new to php and am working a lot off of old page created before me and modifying them. I have to do an age verification page for an alcoholic beverage client (has to be 21+) and I'm having problems with the script actually redirecting correctly based on the birthdate entered. I have a html page with a form that calls this php file. Here is the php script I'm trying to get working: <?php $age = $_POST['year']; if($age > 1990) { header('Location: http://www.underagelink.com'); exit; } else { header('Location: http://legalagelink.com'); exit; } ?> Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/248830-age-verification-script/ Share on other sites More sharing options...
ZulfadlyAshBurn Posted October 10, 2011 Share Posted October 10, 2011 what is the problem you are actually having? Quote Link to comment https://forums.phpfreaks.com/topic/248830-age-verification-script/#findComment-1277875 Share on other sites More sharing options...
deebler Posted October 10, 2011 Author Share Posted October 10, 2011 Sorry, The problem is that no matter what birthday I put in it always directs me to the legal age page. Quote Link to comment https://forums.phpfreaks.com/topic/248830-age-verification-script/#findComment-1277877 Share on other sites More sharing options...
jcbones Posted October 10, 2011 Share Posted October 10, 2011 Lets see the form that posts to this page. Quote Link to comment https://forums.phpfreaks.com/topic/248830-age-verification-script/#findComment-1277879 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.