|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Hi,
I'm new to php / mysql, and I'm trying to setup a page that will login the users name, email, location, age, ect. I've got a good handle on collecting the data and storing it in the database, but what I need help with is, I'd like to be able to redirect the user to a different page depending on what age the user claims to be. ie if they are 5-15 they'd get redirected to one page, 16-26 to another, ect. I'd like to have it work by giving the users the option to select their birth date not by having them just select how old they are. Any tips on how I would be able to accomplish this would be much appreciated. Thanks Brahm URL |
|
#2
|
|||
|
|||
|
nevermind I found it.
If anybody was intrested here is the code I used.
$bdayunix = mktime ("","","",$month,$day,$year); $nowunix = time(); $ageunix = $nowunix - $bdayunix; $age = floor($ageunix / (365 * 24 * 60 * 60)); if ($age < 18){ echo "you are to young";} |
|
#3
|
||||
|
||||
|
Great job
Don't you love it when you solve your own problems ![]() Congrats.. That's what I was going to recomend you do, by the way |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > age verification question. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|