chris_s_22 Posted January 9, 2009 Share Posted January 9, 2009 what i want to achieve is that when people sign up i want to have the date entered into my database so far all i done is create a regdate feild to the database the "type" i used is "date" not sure what the code would be, please help or direct me to a tutorial that explains how and what to do pinkangel_@hotmail.co.uk Quote Link to comment https://forums.phpfreaks.com/topic/140156-registration-date-added-to-registering/ Share on other sites More sharing options...
premiso Posted January 9, 2009 Share Posted January 9, 2009 In your INSERT query use the NOW() keyword in MySQL, to learn more about it google MySQL NOW(). Quote Link to comment https://forums.phpfreaks.com/topic/140156-registration-date-added-to-registering/#findComment-733372 Share on other sites More sharing options...
chris_s_22 Posted January 9, 2009 Author Share Posted January 9, 2009 thx for your replys guys i ended up using this // Get the current date $regdate=date("Y-m-d"); // And then this to store the information in the database $query = "insert into user (regdate) values (''$regdate')"; this works, just wanted to check with you guys if there was a reason why this was incorect or any reason why i shouldnt do it this way Quote Link to comment https://forums.phpfreaks.com/topic/140156-registration-date-added-to-registering/#findComment-733669 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.