SunQuest
 
           General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
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  
Old April 18th, 2003, 02:35 AM
brahm brahm is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 2 brahm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to brahm
Question age verification question.

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

Reply With Quote
  #2  
Old April 18th, 2003, 12:38 PM
brahm brahm is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 2 brahm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to brahm
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";}

Reply With Quote
  #3  
Old April 18th, 2003, 02:03 PM
nicat23's Avatar
nicat23 nicat23 is offline
Addicted to Chaos..
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jan 2003
Location: Ft. Worth, TX
Posts: 653 nicat23 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 47 m 52 sec
Reputation Power: 0
Send a message via AIM to nicat23 Send a message via Yahoo to nicat23
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > age verification question.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway