bryanptcs Posted December 19, 2006 Share Posted December 19, 2006 I am wanting a timestamp to be placed into my db when the form is submitted, below is my php code for trying to do this:[code]$timestamp = date('Y d m h:i:s');echo $timestamp; $sql = "insert into upload SET id='$id' , business='$business', address='$address', city='$city', contact='$contact', salesrep='$salesrep', phone='$phone', email='$email', name='$fileName', time='$timestamp' ";[/code] Link to comment https://forums.phpfreaks.com/topic/31274-timestamp-in-my-db/ Share on other sites More sharing options...
artacus Posted December 19, 2006 Share Posted December 19, 2006 So what is your question? Link to comment https://forums.phpfreaks.com/topic/31274-timestamp-in-my-db/#findComment-144793 Share on other sites More sharing options...
fenway Posted December 19, 2006 Share Posted December 19, 2006 Better to use time=NOW()..... and why are you setting the id? Link to comment https://forums.phpfreaks.com/topic/31274-timestamp-in-my-db/#findComment-144794 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.