This topic is locked

Adding date at registration

11/29/2005 7:26:38 PM
PHPRunner General questions
K
ke5rs author

I would like to add the current date & time to my table 'members' in the fields 'Date' & 'Time' when the user registers with the 'resister.php' page.

I do not want the text fields for date & time on the front of the registration page for the user to have to fill out.

Can I put the PHP functions date('n/d/Y') and date('g:i:s A') someplace in the code on the registration page?

I have tried for the last couple of days on my own here trying to do this but I just cannot quite get it...

Thank you

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=2149&image=1&table=forumtopics' class='bbc_emoticon' alt=':)' />

Sergey Kornilov admin 11/30/2005

Hi,
you can use something like this code to insert the registering date and time to database.

$fields.=",`Date`, `Time`";

$values.=",now(),now()";


Insert this just before this fragment in register.php file.

$strMessage="";

// check if entered username already exists

K
ke5rs author 11/30/2005

Hi,

you can use something like this code to insert the registering date and time to database.
Insert this just before this fragment in register.php file.


Thank you

Works great

John <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=6917&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />