I know this question has been asked before but none of the solutions is working for me, I have got a form in which the user enters the date of birth, but for reason it is set to mm/dd/yyyy
and I want to change it to dd/mm/yyyy
. As soon as i enter the date like 19/12/1992 it prompts invalid date format.
The code in the form is :
<label for="name">Date of Birth (mm/dd/yyyy) <font color="red"> *</font></label>
<input type="text" name="DOB" value="<?php echo $info['DOB']; ?>" onfocus="$(this).removeClass('date required')" onchange="$(this).addClass('date required')" required />
And the code in the function after POST is:
$DOB = mysql_real_escape_string($_POST['DOB']);