English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I need to ad an age checking system to a webpage, just the basic select day month and year etc, click enter and it either accepts or denies the user from entering the next page.

I'm not very web orientated so was wondering if there's a script or something i can just copy and paste?

Cheers :)

2007-06-20 00:37:36 · 3 answers · asked by thedaveidentity 1 in Computers & Internet Programming & Design

3 answers

Whatever validation system you use, be aware that there is nothing to stop a user entering a false date of birth!

2007-06-20 09:34:42 · answer #1 · answered by Charlie Babbage 5 · 0 0

Try this link:

http://www.devshed.com/c/a/JavaScript/Form-Validation-with-JavaScript/9/

Can't answer your question off the top of my head, but you want to validate a number (age) based on a date range. The link above came up when searching google for 'javascript age validation'. Javascript is easy in that you just embed it into your current html page. Also search for 'form validation'. You can use other technologies like PHP, ASP etc, but you will need to install and configure your own server, maybe a database etc... so if you simply want a user to select their age from a set of drop down menus, test whether the age is older than a specific date or time-stamp and make a decision on whether to pop-up an error or progress to a new page then a simple javascript script will do the trick.

I'm assuming this is a school homework or something... you wouldn't do this on a real site.

2007-06-20 02:02:35 · answer #2 · answered by Christy 1 · 0 0

As said above, you cannot really check the age of the user...
The only way some check can be made is by asking the user to enter his/her credit card details and promise not to charge anything. However, by doing so, most people will just click "Esc"...
Beware again, some kids have the CC of their parents, so it is not full-proof either.

2007-06-20 20:17:12 · answer #3 · answered by just "JR" 7 · 0 0

fedest.com, questions and answers