0
私はHTMLフォームを持っています。ファイルアップロードボタンがあります - ファイルはアップロードフォルダにアップロードされます。私はHTML PHPフォームファイルアップロード - 送信時にファイル名を表示し、電子メールにファイルを送信する
が必要です。投稿時にアップロードされたファイル名が表示されています。これは、このブロックに追加する必要があります。このフォームは一度
モーメントますprint_rで<?php if(isset($emailSent) && $emailSent == true) { //If email is sent ?> <div id="sadhu"> <p class="general_site">First Name:<strong><?php echo $firstname;?></strong></p> <p class="general_site">Last Name:<strong><?php echo $lastname;?></strong></p> <p class="general_site">Email:<strong><?php echo $email;?></strong></p> <p class="general_site">Theme:<strong><?php echo $theme;?></strong></p> <p class="general_site">Type:<strong><?php echo $type;?></strong></p> <p class="general_site">Upload:<strong><?php print_r($_FILES['datafile']);?></strong></p> </div> <?php } ?>
はファイルを示していますが厄介配列に私はそれをクリーンアップする必要があります...
添付ファイルがないのにメールが届きました。私が持っているすべては、このされた電子メールを送信し一部では:あなたの最初の質問のための
//If there is no error, send the email if(!isset($hasError)) { $emailTo = '[email protected]gv.co.za'; //Put your own email address here $body = "First Name: $firstname \n\nLast Name: $lastname \n\nEmail: $email \n\nTheme: $theme \n\nType of Abstract: $type \n\nUpload: $datafile \n\n"; $headers = 'From: My Site <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email; mail($emailTo, $subject, $body, $headers); $emailSent = true; }
Hiya Bru :)優秀 - よく私は$ FILESのビットを考え出したと言わなければならない - ありがとう、そのチュートリアルをチェックアウトします。 – brett