Generate MySQL Datetime Type Using PHP Date() Function

If you want to insert a datetime that matches the default mysql datetime type format use this

date('Y-m-d H:i:s');