First of all, I love this site! These forms work great! I just need to know one thing...
Does anyone know how I can include a date/timestamp to the submitted data?
You have the right idea but you don't need anything in the form.html file.
Change this line
Date and Time: " . $_POST['dtstamp'] . "
to
Date and Time: " . $dtstamp . "
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First of all, I love this site! These forms work great! I just need to know one thing...
Does anyone know how I can include a date/timestamp to the submitted data?
I am using the "Create a new form" online tool at: http://phpformgen.sourceforge.net/new_demo/phpformgen/
with both email submission and I am saving data to a txt file.
I downloaded the zip file and then I tried adding a hidden field to the form.html page:
<input type="hidden" name="dtstamp" id="dtstamp">
I then added "$dtstamp=date("m.d.Y, H:i:s");" right after the following in processor.php:
$where_form_is="http://".$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
and then after my last field which is Country: " . $_POST['field_15'] . " - I put:
Date and Time: " . $_POST['dtstamp'] . " to see if it would add the dtstamp hidden field to my output txt file.
Can anyone clue me into where I am going wrong? Is there a way I can get a date/time stamp using phpFormGenerator v3?
You have the right idea but you don't need anything in the form.html file.
Change this line
Date and Time: " . $_POST['dtstamp'] . "
to
Date and Time: " . $dtstamp . "
Works perfect! Thanks!