smokenwhispers Posted May 6, 2009 Share Posted May 6, 2009 I have this form for a website and I want to make it so that the input tag automatically inserts the data in to the input form, and does not allow the person to change it. I know how to do lock it. I just want it to insert the date and time automatically. Quote Link to comment https://forums.phpfreaks.com/topic/157018-automatic-date-inserted-in-forum/ Share on other sites More sharing options...
Northern Flame Posted May 6, 2009 Share Posted May 6, 2009 <?php echo date("m/d/y") . ' ' . date("h:i a"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/157018-automatic-date-inserted-in-forum/#findComment-827135 Share on other sites More sharing options...
allworknoplay Posted May 6, 2009 Share Posted May 6, 2009 I always like to use the time() function and insert the time data UNIX style into the DB... Quote Link to comment https://forums.phpfreaks.com/topic/157018-automatic-date-inserted-in-forum/#findComment-827139 Share on other sites More sharing options...
Northern Flame Posted May 6, 2009 Share Posted May 6, 2009 oh yea good point, i totally forgot about the time function in SQL, sorry i havnt worked with PHP in about a year so im still trying to refresh my mind Quote Link to comment https://forums.phpfreaks.com/topic/157018-automatic-date-inserted-in-forum/#findComment-827143 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.