Jump to content

Help with date/time fetch


INeedAGig

Recommended Posts

Okay, I have this form system/processor I have programmed and I am having a minor issue. When the form data is sent via email I want the date/time the user submitted the information included in the email, mainly for records. Now, I thought using

$_SERVER['REQUEST_TIME']

would work, but it is returning a value of "1320019222" in the email, any tips on how to fix this??

 

Thanks!!

Link to comment
Share on other sites

date(String $format, [int $timestamp]);

 

so probably something like:

$time = date("F j, Y, g:i a", $_SERVER['REQUEST_TIME']);

Though I think most people just do date("format", now());  where format is how you have it above.

 

Test it out and see which gives you what you want.

Link to comment
Share on other sites

date(String $format, [int $timestamp]);

 

so probably something like:

$time = date("F j, Y, g:i a", $_SERVER['REQUEST_TIME']);

Though I think most people just do date("format", now());  where format is how you have it above.

 

Test it out and see which gives you what you want.

 

This is the exact result I was going for, just had my code a little jumbled. Thanks for your help Xtopolis!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.