I have the following date input box in an HTML code:
<input type="date" name="DOB" size="20">
The form data are passed to a different PHP file using the POST method. And there the date is saved to a variable.
$DOB=$_POST['DOB'];
When I echo this variable it prints the date value saved in it. However if I use this variable in a query, the value won't be read. The query does not return any values.
This is my query:
"SELECT site_no, name,NIC,gender,address,telephone FROM employee WHERE emp_no=$emp_no AND DOB=$DOB"