...

View Full Version : Adding attachment capability to contact form



bazz
04-28-2010, 12:10 AM
Hi,

I have a successful contact form but I want to modify it so attachements can be sent.

So I can add the file upload parts to the form



<input name="upload_1" tabindex="9" type="file" onchange="attachmentChanged()" size="25" />



And when the proceesing script runs, should it get the attachment data form the $param{'upload_1'} .

Than how do I include the attachement in the sendmail sub.



open(MAIL,"|$mail_prog -t -oi") or die print "Fail to open sendmail: $!\n";


print MAIL "To: $email\n";
print MAIL "From: ".$cgi->param('email')."\n";
print MAIL "Subject: Internet Enquiry\n\n";
print MAIL "Submitted By: $sendername\n";
print MAIL "Sender Email: $senderemail\n";
print MAIL "----------------------------------------------\n";
print MAIL "Questions or Comments:\n";
print MAIL "$messagebody\n";

close(MAIL);



any pointers appreciated.
bazz



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum