shoutdots Posted August 14, 2007 Share Posted August 14, 2007 Hello I am making a form and i want to insert the current date automatically to the database, how i can do the without putting another date field on the form ?? $select="INSERT INTO dir_all(date,wbname,wbdisc,wblink) VALUES ('','$sitename','$sitedisc','$sitelink')"; Quote Link to comment https://forums.phpfreaks.com/topic/64931-solved-cant-insert-date-to-db/ Share on other sites More sharing options...
hostfreak Posted August 14, 2007 Share Posted August 14, 2007 http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_curdate $select="INSERT INTO dir_all(date,wbname,wbdisc,wblink) VALUES (CURDATE(),'$sitename','$sitedisc','$sitelink')"; Quote Link to comment https://forums.phpfreaks.com/topic/64931-solved-cant-insert-date-to-db/#findComment-324021 Share on other sites More sharing options...
shoutdots Posted August 14, 2007 Author Share Posted August 14, 2007 thank you very much , its working now Quote Link to comment https://forums.phpfreaks.com/topic/64931-solved-cant-insert-date-to-db/#findComment-324039 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.