Greetings;
I am able to write various data to a MySQL dbase using a PHP driven form however the date/time is blank.
This is the sql code that works fine (without the time stamp code):
$sql = "update contacts set " . "address='$address', " . "address2= '$address2'," . "city= '$city'," . "state= '$state'," . "zip= '$zip'," . "country= '$country'," . "officephone= '$officephone'," . "homephone= '$homephone'," . "fax = '$fax'" . "WHERE id LIKE '$recordid' ";
This is the sql code that bugs:
$sql = "update contacts set " . "address='$address', " . "address2= '$address2'," . "city= '$city'," . "state= '$state'," . "zip= '$zip'," . "country= '$country'," . "officephone= '$officephone'," . "homephone= '$homephone'," . "fax = '$fax'," . "whensubmitted = current_date" . "WHERE id LIKE '$recordid' ";
The name of my date/time field is whensubmitted, a No Null datetime type. I tried using NOW() and current_date to no avail, possibly my syntax was not proper?