Solarpitch Posted November 23, 2006 Share Posted November 23, 2006 Hi Guys, Basically, what I am trying to achieve is add the current system date to a table in the database along with a user's details so I know when they registered!Do you know how I would declare the table? I tried [code]cur_timestamp TIMESTAMP NOT NULL[/code]... but that doesnt work. Also how would it look in the insert statement?Cheers! Link to comment https://forums.phpfreaks.com/topic/28280-storing-the-current-date-when-a-user-registers/ Share on other sites More sharing options...
jwk811 Posted November 24, 2006 Share Posted November 24, 2006 you can use the now() function to do this.. heres an example of what your php query might look like to do this..[code]INSERT INTO users (name, password, regdate) VALUES ('$username', $password', NOW())";[/code]hope this helps! Link to comment https://forums.phpfreaks.com/topic/28280-storing-the-current-date-when-a-user-registers/#findComment-129332 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.