Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7897491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:10:47+00:00 2026-06-03T08:10:47+00:00

What is the easiest way to upload a file with this: <input type=file name=clanlogo>

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:10:49+00:00Added an answer on June 3, 2026 at 8:10 am

    Download PHPMailer class and try this…

    <html>
    <head>
    <title>PHPMailer - Mail() basic test</title>
    </head>
    <body>
    
    <?php
    
    require_once('class.phpmailer.php');
    
    $mail = new PHPMailer();     
    $mail->SetFrom('name@yourdomain.com', 'First Last');
    $mail->AddReplyTo("name@yourdomain.com","First Last");
    
    $address = "12345@email.com";
    $mail->AddAddress($address, "John Doe");
    
    $mail->Subject    = "PHPMailer Test Subject via mail()";
    
    $mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional
    
    $mail->MsgHTML($body);
    
    move_uploaded_file($_FILES["file"]["tmp_name"],$destination);
    
    $mail->AddAttachment("$destination");  //Your attachment
    //$mail->AddAttachment("images/phpmailer.gif");      // attachment
    //$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
    
    if(!$mail->Send()) {
      echo "Mailer Error: " . $mail->ErrorInfo;
    } else {
      echo "Message sent!";
    }
    
    ?>
    
    </body>
    </html>
    
    • This is an example from PHPMailer Class
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic upload form: <form method=post action= enctype=multipart/form-data > <input type=file name=logo>
The easiest way to explain this problem is to show you some code: Public
What's the easiest way to do this from my bash prompt?
What is the easiest way to upload images to database using C#?
The easiest way to ask this question would be to show you all through
I'm looking for a simple way to upload a file (an xml file) to
The easiest way to see this problem will be to run the sample project
Is there any way to modify the file upload dialog in firefox with an
Easiest way to explain what I mean is with a code sample. This doesn't
Is this the easiest way in an html doc to create a link to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.