$previouspage =$ENV{'HTTP_REFERER'};
### i know this is not the best solution
if ($previouspage =~ m/int/) {
##define scalars.
$query = new CGI;
$filename = $query->param("profile_data"); #read infilename of data
open(OUTPUT, ">$filename");
binmode $filename;
binmode OUTPUT;
($bytesread,$buffer,$total);
while ($bytesread = read($filename,$buffer,1024) ) {
$total += $bytesread;
if ($bytesread > 10000000) {
close(OUTPUT);
unlink "$filename";
}
print OUTPUT $buffer;
}
close(OUTPUT);
}
Thanks
Well, you've omitted the form (and left us guessing at exactly what is going on, since you don't mention _how_ it isn't working. But for a wild guess I'd say you didn't set the 'enctype' of the form correctly, if you are using CGI.pm to build your form make sure you are using start_multipart_form() and not start_form(), if you are writing your own form tags, make sure your form tag includes enctype="multipart/form-data" and consider reading the file upload portions of the CGI.pm documentation...
| We're not surrounded, we're in a target-rich environment! |
|---|
perlmonks.org content © perlmonks.org and Anonymous Monk, jasonk
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03