Can you try it with a standard form POST and see if that works?
Hi Ian, the form was already POST, what I have done as a test in use a submit button called insert. All form data is submitted as usual but the date field I added a value to & the date fields left blank were written as 0000-00-00 again.
On the update.php page if I select a date on 1 field it does write it into the db & I can clear the 2 other date fields by delete 01-01-1970, this works fine.
Just to clarify the code on the update.php page that inserts the correct date is
<?php
if(isset($_POST['ContactDOB']) && $_POST['ContactDOB'] != "") {
$_POST['ContactDOB'] = date("Y-m-d", strtotime($_POST['ContactDOB']));
}
?>
This is so confusing!