PHP School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a PHP Expert!

Join 307,167 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,531 people online right now. Registration is fast and FREE... Join Now!




registration date added to registration form

 

registration date added to registration form

chris_s_22

9 Jan, 2009 - 06:52 AM
Post #1

D.I.C Head
**

Joined: 27 Dec, 2008
Posts: 52


My Contributions
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

***e-mail address removed***
--jjsaw5

User is offlineProfile CardPM
+Quote Post

 
Reply to this topicStart new topic
Replies(1 - 4)

jjsaw5

RE: Registration Date Added To Registration Form

9 Jan, 2009 - 06:54 AM
Post #2

I must break you
Group Icon

Joined: 4 Jan, 2008
Posts: 2,664



Thanked: 25 times
Dream Kudos: 125
My Contributions
Please do not post your e-mail address. If you would like memebers to contact you please do so VIA PM (Private Message)


Please also take some time to read over our site rules. They can be found by clicking on your "My Profile" and that will open a drop down the a link to the Site Rules.






Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.
User is offlineProfile CardPM
+Quote Post

samf

RE: Registration Date Added To Registration Form

9 Jan, 2009 - 07:37 AM
Post #3

D.I.C Head
**

Joined: 11 Aug, 2008
Posts: 93


My Contributions
Your want to include the NOW() function I believe if you want it to record the date/time they submitted there registration.
User is offlineProfile CardPM
+Quote Post

xerxes333

RE: Registration Date Added To Registration Form

9 Jan, 2009 - 07:37 AM
Post #4

D.I.C Regular
Group Icon

Joined: 5 Jul, 2007
Posts: 454



Thanked: 24 times
Dream Kudos: 25
My Contributions
If you are using MSSQL then you can use getdate() or if you are using MySQL you can use now() when creating records in the database.
User is offlineProfile CardPM
+Quote Post

chris_s_22

RE: Registration Date Added To Registration Form

9 Jan, 2009 - 01:46 PM
Post #5

D.I.C Head
**

Joined: 27 Dec, 2008
Posts: 52


My Contributions
thx for your replys guys i ended up using this

CODE

// 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

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 06:29PM

Live PHP Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month