Page 1 of 1

Form Time Stamp

Posted: Mon Mar 24, 2008 1:56 am
by nootkan
Hello I am trying to get a timestamp that indicates when the form was sent to me. Here's what I tried based on my existing processor.php code and what I found in the php.net manual but it doesn't seem to give me the time or any errors but does give me the "Time Submitted" text then blank space. I have to assume I'm not far off.

Code: Select all

" . $mail_message . "Form Submitted by IP Address: ".$_SERVER['REMOTE_ADDR']."\n

Code: Select all

" . $mail_message . "Time Form Submitted: ".$_SERVER['REQUEST_TIME']."\n
The line above this one gives me the ip address without any problems, so I thought this would be the way to get the time. Is this the wrong approach?
Nootkan

Re: Form Time Stamp

Posted: Mon Mar 24, 2008 3:34 am
by Christopher
Try:

Code: Select all

" . $mail_message . "Time Form Submitted: " . date('Y-m-d h:i:s') . "\n

Re: Form Time Stamp

Posted: Wed Mar 26, 2008 8:08 pm
by nootkan
arborint, thanks for that, it works. It is two hours more than my current time zone, but I'll just subtract the difference when I need too. Thanks again.
Nootkan