brainbug Posted April 2, 2011 Share Posted April 2, 2011 I have an HTML form, and I can write to my MYSQL database by the help of PHP. I want the date to be set to the date the record was set as soon as a record is added. Is it possible with time, too? How exactly can we do that? An example would be very helpful. Thanks. Link to comment Share on other sites More sharing options...
birbal Posted April 2, 2011 Share Posted April 2, 2011 you may like to read the http://w3schools.com/php/php_mysql_insert.asphttp://w3schools.com/php/php_mysql_update.aspyou need a date column in your database table when you will insert any records you can put timestamp using http://php.net/function.time in the date column.or you can set YYYY-MM-DD format using http://php.net/function.dateedit: broken links Link to comment Share on other sites More sharing options...
brainbug Posted April 2, 2011 Author Share Posted April 2, 2011 you may like to read the http://php.net/php/php_mysql_insert.html http://php.net/php/php_mysql_update.htmlyou need a date column in your database table when you will insert any records you can put timestamp using http://php.net/function.time in the date column.or you can set YYYY-MM-DD format using http://php.net/function.date Thank you. I will check it out. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.