Re: PHP Form email w/attachment
| From: | Carlos Medina | Date: | Thu, 18 Dec 2008 08:48:41 +0000 |
| Subject: | Re: PHP Form email w/attachment | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-284775@lists.php.net to get a copy of this message | ||
jeffery harris schrieb:
I need to create a php form and mail it to a recipient (that I can do). My question is how do I create an area for a file (.doc, or .pdf) to be attached emailed along with other form data as well? -Jeff Hi Jeffery,you need to upload the File with the Form inputfield <form action="input_file.htm" method="post" enctype="multipart/form-data"> <input name="Datei" type="file" size="50" maxlength="100000" accept="text/*"> When the upload is ready, use is_uploaded_file() function to check and others to validate the File (important) then move the file with move_ uploaded_ file() to the Directory where you want or attach to the mail you want. Kind Regards Carlos Medina