Stescitixtuts
New Member
I have this problem with saving a date into a MySQL database.I have this input field:\[code\]<input type="date" name="theDate" id="theDate" required></p>\[/code\]Before I save it to the database I format the string to a date like this:\[code\]date('Y.m.d', strtotime($table['day']));\[/code\]The database field is a DATE but it only saves \[code\]0000-00-00\[/code\].When I echo out the date before saving it, it is correctly \[code\]2012-02-23\[/code\].I hope anyone can tell me how this is done.