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 6607659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:31:37+00:00 2026-05-25T19:31:37+00:00

Possible Duplicate: JavaScript: Upload file Uploading a file with html, javascript, and php So

  • 0

Possible Duplicate:
JavaScript: Upload file
Uploading a file with html, javascript, and php

So I am trying to get my upload file code to work better. If someone could show me a simple way to upload a file, that could help me simplify my code, where it only uses javascript and PHP.

EDIT: If I could get a simple block of code in javascript and php then i could figure out the rest. I just cant find any good simple code snippets that shows the form, input, validate input, post to server, etc.

var myPatentOtherBrowseContainer = document.createElement('input');
            myPatentOtherBrowseContainer.name = 'myPatentOtherBrowseContainer';
            myPatentOtherBrowseContainer.id = 'myPatentOtherBrowseContainer';
            myPatentOtherBrowseContainer.type = 'file';
            myPatentOtherBrowseContainer.multiple = 'multiple';
            myPatentOtherBrowseContainer.size = '60';

this is just part of the code.

BTW, javascript is part of the code so it should be a tag!

  • 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-05-25T19:31:37+00:00Added an answer on May 25, 2026 at 7:31 pm

    You want to use <input type="file" name="myFile">
    and then you get access to that file through $_FILE['myFile']

    Look through this tutorial, you can make the filefetching phpscript be called through AJAX if needed.

    EDIT:

    You pointed out you want help with the javascript part. I suggest you use jQuery to simplify any AJAX call through jQuerys .post() function.

    You can read up on that here

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

Sidebar

Related Questions

Possible Duplicate: How to hide text field in Html File Upload I'm setting up
Possible Duplicate: Pass a PHP string to a Javascript variable (and escape newlines) I
Possible Duplicate: How do I calculate someone's age in C#? Maybe this could be
Possible Duplicate: JavaScript scope and closure What is this for? (function(){ //The code to
Possible Duplicate: Javascript: find the time left in a setTimeout()? I'm trying to use
Possible Duplicate: JavaScript function aliasing doesn't seem to work Why doesn't this work? function
Possible Duplicate: Is JavaScript's Math broken? <html> <body> <script type=text/javascript> var w = 0;
Possible Duplicate: Javascript: Setting window.location.href versus window.location When I tested these code in browser
Possible Duplicate: Passing javascript variable to PHP Hi I wonder if it's possible to
Possible Duplicate: upload files via iPad Hey guy's I'm trying to create a native

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.