TM3909 Posted May 10, 2008 Share Posted May 10, 2008 I'm creating a form that will post to a database and need to post a date with it. I tried to set the database to do this automatically via PHPMyAdmin, where it would automatically time stamp upon update, but I was slapped with MySQL error 1294. Heres the code: [input id="post_date" name="post_date" value="currentdate" type="text" /] I need to enter something in the value so the server posts the current date/time. Link to comment https://forums.phpfreaks.com/topic/105022-php-form-date/ Share on other sites More sharing options...
xenophobia Posted May 10, 2008 Share Posted May 10, 2008 You don't have to do this through a form... Simply use time() which return the unix-timestamp and store it into your database. Link to comment https://forums.phpfreaks.com/topic/105022-php-form-date/#findComment-537576 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.