Validation of age?

Reply

Join Date: Apr 2009
Posts: 119
Reputation: genieuk is an unknown quantity at this point 
Solved Threads: 0
genieuk genieuk is offline Offline
Junior Poster

Validation of age?

 
0
  #1
Apr 19th, 2009
Hi,

I'm new here,

Does someone have a script that asks user to enter there day/month/year and if over xx minimum age they are taken to website, if under age they are told they are under age and redirected to a link i specify.

Possibly with a function to choose to deny access to any webpage on the site or just certain pages.

If someone has a script or would write one could you please post.

I have seen many online but none of them do all the above and have limitations.

Thank you,
genieuk
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: Validation of age?

 
0
  #2
Apr 19th, 2009
Why don't you try it yourself first ?

> Get the input (the age) from the user
> Use some conditional statements ( if(condition) { /... } ) to check whether the script has to grant access or not
> Now you only need a command which redirects the user to a page in case the age validation has failed ...

Hope this helps !

Edit:: http://java.sun.com/j2se/1.4.2/docs/...(java.net.URL)
Last edited by tux4life; Apr 19th, 2009 at 7:31 am.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 119
Reputation: genieuk is an unknown quantity at this point 
Solved Threads: 0
genieuk genieuk is offline Offline
Junior Poster

Re: Validation of age?

 
0
  #3
Apr 19th, 2009
Hi,

I am no a programmer or coder or anything, reason for posting in hoping someone already has a script or could create one.

Thanks
genieuk
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: Validation of age?

 
0
  #4
Apr 19th, 2009
Does it really have to be in Java, as it might be easier to do in PHP ...
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 119
Reputation: genieuk is an unknown quantity at this point 
Solved Threads: 0
genieuk genieuk is offline Offline
Junior Poster

Re: Validation of age?

 
0
  #5
Apr 19th, 2009
Hi,

If it is PHP that would be better again

Thank you,
genieuk
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,223
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 489
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: Validation of age?

 
-1
  #6
Apr 19th, 2009
Java and JavaScripts are two different technologies, dude!

I made request to move this post in correct place...
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: Validation of age?

 
0
  #7
Apr 19th, 2009
Originally Posted by peter_budo View Post
Java and JavaScripts are two different technologies, dude!

I made request to move this post in correct place...
Yup, he's confusing them, but I think PHP will probably his best bet to achieve something like this ...

May I suggest to move this to the PHP forum ?
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 119
Reputation: genieuk is an unknown quantity at this point 
Solved Threads: 0
genieuk genieuk is offline Offline
Junior Poster

Re: Validation of age?

 
0
  #8
Apr 19th, 2009
Yes, php forum would be better. I am very sorry i thought i posted in Javascript forum NOT Java forum
Last edited by genieuk; Apr 19th, 2009 at 8:04 am.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 189
Reputation: martin5211 is an unknown quantity at this point 
Solved Threads: 14
martin5211 martin5211 is offline Offline
Junior Poster

Re: Validation of age?

 
0
  #9
Apr 19th, 2009
Look at the *third* code example:

http://www.lotsofcode.com/php/validation.htm

is_numeric() is a common form to avoid characters from alphabet on age field.
Last edited by martin5211; Apr 19th, 2009 at 12:37 pm.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 119
Reputation: genieuk is an unknown quantity at this point 
Solved Threads: 0
genieuk genieuk is offline Offline
Junior Poster

Re: Validation of age?

 
0
  #10
Apr 19th, 2009
Originally Posted by martin5211 View Post
Look at the *third* code example:

http://www.lotsofcode.com/php/validation.htm

is_numeric() is a common form to avoid characters from alphabet on age field.
Hi,

Thanks but this is not what i was wanting.

I want to put code on a page that shows a Day/Month/Year box (3 boxes one for Day, one for Month and one for Year.

If user falls below the minimum age they are redirected to a page of my choice. If they pass the minimum age they are then shown the page, possibly with function i can add to all my pages so if someone tries to access any page on my site they are first taken to the verification page.

Thank you,
genieuk
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC