They way that I handle dates, using a transform function like Daves is to put them into Session Values and then insert the session values into the database. There might be a neater way than this though....
Here is a quick example:
<?php
if (isset($_POST["BT_Add"])) { // Trigger
if ($_POST['dateup'] != '') {
$_SESSION['var_update'] = formatUKDateMySQL($_POST['update']);
} else {
$_SESSION['var_update'] = Null;
}
if ($_POST['datedown'] != '') {
$_SESSION['var_downdate'] = formatUKDateMySQL($_POST['downdate']);
} else {
$_SESSION['var_downdate'] = Null;
}
}
?>
Basically the code above checks to see if the date field is populated. If it is it transforms the date to UK and if not then it passes a null value. That way I get either a UK date or blank field.
Hope this helps?
Cheers
Ian