|
I'm trying to insert a date/time code into a mysql database via PHP. I'm trying to insert a date/time in to the database if a date is not submitted via the form. (ie. if $_POST["theDate"] == "", then use the current date). Other than using date() and formatting the date using "y" "m" and "d", is there a way to either set a defualt SQL vault as the current date if nothing is entered, or to have PHP make a time stamp of the current date/time and insert that into the field? Thanks.
|