Jump to content

Age Verification script


deebler

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/248830-age-verification-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.