I have a HTML page that has form fields and a field to upload. I have been having trouble getting my files to upload. I searched for "uploads" and found a lot of good information, but for some reason I cannot get it to work eamil me anything. Here is my code for the cgi:
#!/usr/local/bin/perl -w
use CGI; # load CGI routines
use Mail::Sendmail;
$q = new CGI;
@names = $q->param;
$name = $q->param('name');
$company = $q->param('company');
$address = $q->param('address');
$city = $q->param('city');
$state = $q->param('state');
$zip = $q->param('zip');
$phone = $q->param('phone');
$fax = $q->param('fax');
$email = $q->param('email');
$comments = $q->param('comments');
$file = $q->param('file');
print $q->header, # create the HTTP header
$q->start_html(-title=>'Email Sent',
-BACKGROUND=>'http://65.108.100.28/images/bkg3
+.jpg',
-LINK=>'blue',
-ALINK=>'maroon'), # start the HTML
"<p align=\"center\"><font size=\"6\">Thank you<br><br></font
+>",
"<font size=\"7\">Your Email has been sent to stu96art@yahoo.
+com</font>", # level 1 header
'</p>',
'<br><br><br><br>',
"<p align=\"center\">Click here go to the <a color=\"blue\" h
+ref=\"http://65.108.100.28/index.html\">home page</a><br><br>",
"<p align=\"center\">Click here return to the <a color=\"blue
+\" href=\"http://65.108.100.28/contact.html\">contact page</a><br><br
+>",
"<p align=\"center\">The values you sent were</p>",
$q->h2("NAME: $name\n<br> COMPANY: $company\n<br> ADDRESS: $a
+ddress\n<br> CITY: $city\n<br> STATE: $state\n<br> ZIP: $zip\n<br> PH
+ONE: $phone\n<br> FAX: $fax\n<br> EMAIL: $email\n<br> COMMENTS: $comm
+ents\n<br>"),
$q->end_html; # end the HTML
use MIME::Lite;
$msg = new MIME::Lite
From =>'technicu@technicut.net',
To =>'stu96art@yahoo,com',
Cc =>'some@other.com, some@more.com',
smpt =>'64.176.60.59',
Subject =>'A message with 2 parts...',
Type =>'multipart/mixed';
attach $msg
Type =>'TEXT',
Data =>"NAME: $name\n COMPANY: $company\n ADDRESS: $add
+ress\n CITY: $city\n STATE: $state\n ZIP: $zip\n PHONE: $phone\n FAX:
+ $fax\n EMAIL: $email\n COMMENTS: \n \n $comments";
attach $msg
Type =>'image/gif',
Path =>"$file",
Filename =>"$file";
$msg->send;
I was also wondering how I could download any file, possible not just a .gif file. I would look to download .dxf, .cad (drawing files), but be able to upload any type of file. Is this possible? Thanks.