18). Here is my question: what is the variable name of that date_of_birth field from the form?Thanks for any helpkazpad"> variable name of input field for PHP validation - Forums

Forums

variable name of input field for PHP validation

kazpad 17 Nov, 2010
Hello,
I am currently setting up a form, which has the date of birth in it. I need to present additional fields depending on whether the person (whose date of birth is captured) is of full age.

I therefore need to do some kind of "full-age-validation", which I will probably do in PHP (something like current_date - date_of_birth > 18).

Here is my question: what is the variable name of that date_of_birth field from the form?

Thanks for any help

kazpad
GreyHead 17 Nov, 2010
Hi kazpad,

The usually way of getting a value from the form is to use the Joomla! JRequest methods - there are probably thousands of examples here by now.
<?php
$date_of_birth = JRequest::getString('date_of_birth', '', 'post');
. . .
?> 


Bob
This topic is locked and no more replies can be posted.