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
https://forums.phpfreaks.com/topic/250134-help-with-datetime-fetch/
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.

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.