check out derive fields.
the guide has examples of this:
http://www.tectite.com/fmhowto/derived.php
Welcome to the Tectite Forums! You can download and get support for our free PHP FormMail (form processor) and other free software.
How do I generate and then pass the Date/Time of form Submission???
s.
check out derive fields.
the guide has examples of this:
http://www.tectite.com/fmhowto/derived.php
Simplified example for clarity:-
<?
$emaildate = date("d/m/Y"); // set email date
$servertime = time ();
$servertime = $servertime - 3600;
$emailtime = date("G:i",$servertime); // set email time
?>
...
<form name="enqform" method="post" action="http://www.mysite.com/formmail.php">
...
<input type="hidden" name="emaildate" value="<? echo($emaildate) ?>" />
<input type="hidden" name="emailtime" value="<? echo($emailtime) ?>" />
...
</form>
In this example I've subtracted 3600 from the servertime because the time of the server is one hour ahead of local time, which is what I want in the email. You can adjust as necessary. Note also the formatting of the date and time - once again, you can change it as required, of course.
Using derived fields you can use something like
<input type="hidden" name="derive_fields" value="Date=%dom0%.%'/'%.%moy0%.%'/'%.%fullyear%,Time=%hour240%.%':'%.%min%" />
but that doesn't allow for an offset between server time and local time.
Last edited by Ben; 11-Oct-2011 at 11:41 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks