php mailer with file upload
<p>I am trying to have a php mailer code attach a file along with the regular information. I don't know what to do. Here is how far I have come.</p>

<p><strong>Form.html</strong></p>

<pre><code>&lt;form method="post" name="contact" action="contactprocessor.php"&gt;
&lt;label for="name"&gt;Name: &lt;/label&gt; &lt;input type="text" id="name"&gt;
&lt;label for="email"&gt;email: &lt;/label&gt; &lt;input type="email" id="email"&gt;
&lt;label for="file"&gt;Upload file: &lt;/label&gt; &lt;input type="file" id="file"&gt;
&lt;input type="submit" id="name" value="upload"&gt;
</code></pre>

<p><strong>contactprocessor.php</strong></p>

<pre><code>&lt;?php 
$emailSubject = 'file upload';
$mailto ='me@mymail.com';
$nameField = $_POST['name'];
$emailField = $_POST['email'];
$body = &lt;&lt;&lt;EOD 
NAME: $name &lt;br&gt;
Email: $email &lt;br&gt;
EOD;
$headers = "from: $email\r\n";
$success = mail($mailto, $emailSubject, $body, $headers);
?&gt;
</code></pre>
