compassman
08-04-2006, 10:29 PM
I have this CGI script which isn't working quite right:
#!/usr/bin/perl -w
open (OUTPUT, ">>db.txt")|| die "cannot open: $!";
$cgi_arg = $ENV{'QUERY_STRING'};
print OUTPUT $cgi_arg;
print OUTPUT "\n";
close (OUTPUT);
print "Location: http://mysite.here.com/results.html\n\n";
The routine does collect the data and outputs it to the file. It also calls the file at the end of the script, but there is a problem. The displayed results are not correct unless I refresh the page. Then the numbers are correct. Is there a problem with the way I am calling the results files?
#!/usr/bin/perl -w
open (OUTPUT, ">>db.txt")|| die "cannot open: $!";
$cgi_arg = $ENV{'QUERY_STRING'};
print OUTPUT $cgi_arg;
print OUTPUT "\n";
close (OUTPUT);
print "Location: http://mysite.here.com/results.html\n\n";
The routine does collect the data and outputs it to the file. It also calls the file at the end of the script, but there is a problem. The displayed results are not correct unless I refresh the page. Then the numbers are correct. Is there a problem with the way I am calling the results files?