I have a registration form that loads into a dava.csv file (code below). I want to add a time/date stamp so that each time someone registers, the last column in the spreadsheet shows the time/date. I've tried several things but all have failed and the form stops working. I'm taking classes this fall on programming but need to do this now, unfortunately. Any help? :confused:
[PHP] <?php
@extract($ POST);
if(is_writable( 'data.csv'))
{
$fp = fopen('data.csv ','a');
$content = "\"$fRSVP\",\"$ fRepName\",\"$f RepTitle\",\"$f Lunch\",\"$fPre fix\",\"$fFirst Name\",\"$fLast Name\",\"$fTitl e\",\"$fCompany \",\"$fAddress\ ",\"$fCity\",\" $fProvince\",\" $fPostalCode\", \"$fTelephone\" ,\"$fFax\",\"$f Email\r\n"
fwrite($fp,$con tent);
fclose($fp);
header("Locatio n: return URL");
}
else
{
echo'File is not writable';
}
?>
[/PHP]
[PHP] <?php
@extract($ POST);
if(is_writable( 'data.csv'))
{
$fp = fopen('data.csv ','a');
$content = "\"$fRSVP\",\"$ fRepName\",\"$f RepTitle\",\"$f Lunch\",\"$fPre fix\",\"$fFirst Name\",\"$fLast Name\",\"$fTitl e\",\"$fCompany \",\"$fAddress\ ",\"$fCity\",\" $fProvince\",\" $fPostalCode\", \"$fTelephone\" ,\"$fFax\",\"$f Email\r\n"
fwrite($fp,$con tent);
fclose($fp);
header("Locatio n: return URL");
}
else
{
echo'File is not writable';
}
?>
[/PHP]
Comment