Hello people, pardoned my English, are Italian and I speak it little. I have realized a given field of birth to use ereg, the control I have made it but I have two problems, one takes all the numbers to me therefore exits dates outside type 99/89/9999 and then I would want to impose that the customer does not put one given advanced before at least 15 years regarding the odiera date.... as I make? I explain myself better if the customer puts date "10/10/2002" this is not corrected why a child of a year cannot be who records itself... therefore under one given to type 10/10/1990 then the field goes bene..per hour you place the control that I have made. The date must have only this format xx/xx/xxxx

function CheckReg2() { 

$errori = array(); 

$date = $_POST["date"]; 
if ($date == ""){ 
$errori[0] = "You must compile the field correctly"; 
 } 

else if (!eregi("^([0-9]{1,2})/([0-9]{1,2})/([0-9]{4})$", $date)) { 
$errori[0] ="characters invalids"; 
 } 

return $errori; 
 } 


๐Ÿ˜•

    thanks, seen but I do not succeed myself to find the just combination๐Ÿ˜•

      Write a Reply...