I'm having a problem with my form. I have an input box I'm using to input a birth date. Its not a required input. When I test the form leaving the birth date box empty, it returns as 12-31-1969.
If the date box is left empty, I need it to return empty.
Im assuming there is a check needed to prevent this.
Here is the code I currently have;
This is the check at the top of the page
$birthDate = $_REQUEST[birthDate] ? date('d-m-Y', strtotime($_REQUEST[birthDate])) : null;
this is my input box
<input type="text" name="birthDate" id="birthDate" value="<?php echo $birthDate ?>" />