| | |
Validation of age?
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2009
Posts: 119
Reputation:
Solved Threads: 0
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
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
Why don't you try it yourself first ?
> Get the input (the age) from the user
> Use some conditional statements (
> 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)
> 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."
Java and JavaScripts are two different technologies, dude!
I made request to move this post in correct place...
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
Publilius Syrus
(~100 BC)
LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
•
•
•
•
Java and JavaScripts are two different technologies, dude!
I made request to move this post in correct place...
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."
•
•
Join Date: Aug 2007
Posts: 189
Reputation:
Solved Threads: 14
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.
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.
•
•
Join Date: Apr 2009
Posts: 119
Reputation:
Solved Threads: 0
•
•
•
•
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.
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
![]() |
Similar Threads
- html/php form for .htaccess validation (PHP)
- error in javascrip form validation.. pls help (PHP)
- Help me in username and password validation through accessing the database (ASP.NET)
- Epected Primary Errors (C++)
- Problems with Switch (C++)
- Validation COntrol (C#)
- Age Calculator (C)
- Data validation (C++)
Other Threads in the PHP Forum
- Previous Thread: Return Car Make from MySQL database & have the make hyperlinked.
- Next Thread: css gallery hit counter?
| Thread Tools | Search this Thread |
.htaccess ajax apache api array beginner binary broken cakephp checkbox class cms code crack cron curl database date directory display download dynamic echo email error fcc file files folder form forms freelancing function functions google href htaccess html image include incode insert integration ip java javascript joomla limit link login loop mail menu method mlm mod_rewrite multiple mysql oop pageing pagerank paypal pdf php problem query radio random recursion recursiveloop regex remote script search server sessions sms soap source space sql strip_tags subversion support! syntax system table template tutorial update upload url validation validator variable video web window.onbeforeunload=closeme; xml youtube






