in reply to Reading a File Uploaded to a cgi script

Here is an example of a working upload html/script. Perhaps it will help you with yours.

First the HTML file (upload.html):

<html> <body> <form method=post action="upload.cgi" ENCTYPE="multipart/form-data"> <input type="file" name=foo> <input type="submit"> </form> </body> </html>
and now the upload.cgi script:
#!/bin/perl use CGI; my $self=new CGI; print $self->header; for $a ($self->param()) { print "$a ... ",$self->param($a),"<br>"; } $fh=$self->param('foo'); print while $_=<$fh>;

Replies are listed 'Best First'.
Re: Re: Reading a File Uploaded to a cgi script
by rhowerton (Novice) on Mar 13, 2001 at 23:50 UTC
    Thanks for the help...problem solved.