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

  • Home
  • SEARCH
  • 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 8326191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:41:18+00:00 2026-06-09T00:41:18+00:00

I am creating a simple form that let user upload a file, and a

  • 0

I am creating a simple form that let user “upload” a file, and a comments box.
after the user choose the file(can be image or pdf) and click submit, i am not gonna store
the file into my web server, the file will be inserted into an email and send to me.

my question is: how can i attach the file without storing it in any place.

I don’t want to use third party module.

Update:

$attachment = $_FILES["OrderList"]["tmp_name"];
$content = file_get_contents($attachment);
$content = chunk_split(base64_encode($content));

I got an error:

Filename cannot be empty in C:\dir\orders\upload.php on line 24

line 24 is $content = file_get_contents($attachment);

  • 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-09T00:41:19+00:00Added an answer on June 9, 2026 at 12:41 am

    You have already stored it when you accept the file-upload from PHP.

    Simply use it when it is stored in the tmp folder.

    PHP will automagically delete it for you when your script ends.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a form. As of right now I have simple MAILTO form that
I was creating sixth form for a simple one digit user input and it
I'm creating a simple form that takes a referal code and email address, stores
I'm creating a very simple form that has a text area. The text area
I'm looking at creating a very simple HTML page that contains an HTML form
I'm creating simple payment form that allows users to select from several different gateways
I am creating a simple page that will, after clicking a button, replace one
I'm creating a simple form and in this form I want to have an
I'm creating a simple contact form within my ZF application. It doesn't feel like
When I'm creating a simple Windows form, is it starting in a new thread

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.