5 pts.
 How to build?
I have some form mail php code for single file attachment. I want to build it o multiple file upload code. How to do this? this is the code <?php $membertype=ucfirst($_REQUEST["membertype">); $straddress=ucfirst($_REQUEST["straddress">); $strcity=ucfirst($_REQUEST["strcity">); $strstate=ucfirst($_REQUEST["strstate">); $phone=$_REQUEST["strno">; if($phone != ""){ $strno=$phone; } else { $strno="-"; } $stremail=$_REQUEST["stremail">; $strcomments=ucfirst($_REQUEST["strcomments">); $filename=$_FILES["strresume">["name">; $filetype=$_FILES["strresume">["type">; $filesize=$_FILES["strresume">["size">; $filetemp=$_FILES["strresume">["tmp_name">; $filename=$_FILES["strresume2">["name">; $filetype=$_FILES["strresume2">["type">; $filesize=$_FILES["strresume2">["size">; $filetemp=$_FILES["strresume2">["tmp_name">; if($filetype=="image/jpeg" or $filetype=="text/plain" or $filetype=="application/msword") { $message= ' // MAIL SUBJECT $subject = "Mail with image file attachment"; // TO MAIL ADDRESS $to="name@name.com"; /* // MAIL HEADERS $headers = "MIME-Version: 1.0n"; $headers .= "Content-type: text/html; charset=iso-8859-1n"; $headers .= "From: Name <name@name.com>n"; */ // MAIL HEADERS with attachment $fp = fopen($strresume, "rb"); $file = fread($fp, $strresume_size); $file = chunk_split(base64_encode($file)); $num = md5(time()); //Normal headers $headers = "From: Name<name@name.com>rn"; $headers .= "MIME-Version: 1.0rn"; $headers .= "Content-Type: multipart/mixed; "; $headers .= "boundary=".$num."rn"; $headers .= "--$numrn"; // This two steps to help avoid spam $headers .= "Message-ID: <".$now." TheSystem@".$_SERVER['SERVER_NAME'].">rn"; $headers .= "X-Mailer: PHP v".phpversion()."rn"; // With message $headers .= "Content-Type: text/html; charset=iso-8859-1rn"; $headers .= "Content-Transfer-Encoding: 8bitrn"; $headers .= "".$message."n"; $headers .= "--".$num."n"; // Attachment headers $headers .= "Content-Type:".$strresume_type." "; $headers .= "name="".$strresume_name.""rn"; $headers .= "Content-Transfer-Encoding: base64rn"; $headers .= "Content-Disposition: attachment; "; $headers .= "filename="".$strresume_name.""rnn"; $headers .= "".$file."rn"; $headers .= "--".$num."--"; // SEND MAIL @mail($to, $subject, $message, $headers); fclose($fp); echo '<font style="font-family:Verdana, Arial; font-size:11px; color:#333333; font-weight:bold">Attachment has been sent Successfully.<br /></font>'; } else { echo '<font style="font-family:Verdana, Arial; font-size:11px; color:#F3363F; font-weight:bold">Wrong file format. Mail was not sent.</font>'; //echo "<script>window.location.href='careers.html';</script>"; } ?>

Software/Hardware used:
ASKED: August 30, 2008  8:23 AM

Answer Wiki:
Last Wiki Answer Submitted:  Be the first to answer this question.
All Answer Wiki Contributors:  Be the first to answer this question.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _