#!C:/perl/bin/perl.exe $redirect_to = "../thanks.htm"; $path_to_datafile = "../www/data"; use CGI; $query = new CGI; #print $query->header; #print $query->start_html(-title=>'Dump'); #timestamp the submission ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); $mon++; #determine the data filename, open and dump data $filename = $query->param('00exp'); open(INFO, ">>$path_to_datafile/data.txt"); foreach $key (sort($query->param)) { $value = $query->param($key); #filter out "'s and ,'s $value =~ s/\"/\'/g; $value =~ s/,/ /g; if ($value !~ /^pf/) { print INFO "\"$value\","; } else { # filter out items that need to be expanded at submission time pf* if ($value =~ /^pfDate/) { print INFO "\"$mon/$mday/$year\","; } if ($value =~ /^pfTime/) { print INFO "\"$hour:$min:$sec\","; } if ($value =~ /^pfRemote/) { print INFO "\"",$query->remote_addr(),"\","; } if ($value =~ /^pfReferer/) { print INFO "\"",$query->referer(),"\","; } } #print "$key:$value"; } print INFO "\"complete\"\n"; close (INFO); print $query->redirect($redirect_to); exit();