What is the easiest way to upload a file with this: <input type="file" name="clanlogo"> and email it to “12345@email.com” I have researched, but have found super complicated codes and stuff. I need it to send as an attachment. In PHP. Here is the code i have so far:
<?php
## CONFIG ##
# LIST EMAIL ADDRESS
$recipient = "my email Here";
# SUBJECT (Contact Form/Remove)
$subject = "Volunteer Form";
# RESULT PAGE
$location = "thank_you.html";
## FORM VALUES ##
# SENDER
$email = $_REQUEST['email'] ;
# MAIL BODY
$body .= "First Name: ".$_REQUEST['first_name']." \n";
$body .= "Last Name: ".$_REQUEST['last_name']." \n";
$body .= "Email: ".$_REQUEST['email']." \n";
$body .= "Volunteer Choice: ".$_REQUEST['dropdown']." \n";
$body .= "Questions: ".$_REQUEST['comments']." \n";
# add more fields here if required
## SEND MESSGAE ##
I just need some code to add to it that will allow me to upload a file.
Download PHPMailer class and try this…