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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:44:13+00:00 2026-05-28T13:44:13+00:00

My HTML FORM code: <form action=upload.php method=GET enctyped=multipart/form-data> <label for=file> Filename:</label> <input type=file name=loadedFile

  • 0

My HTML FORM code:

        <form action="upload.php" method="GET" enctyped="multipart/form-data">
            <label for="file"> Filename:</label>
            <input type="file" name="loadedFile" id="file"/></br>
            <input type="submit" name="uploadItNow" value="Submit"/>
            hai, this is this the uploader.
        </form>

PHP File uploader script:

if (isset($_GET['uploadItNow'])) // checks if submit button has pressed
{

    if ($_FILES['loadedFile']["error"] > 0)

        echo "Error: ". $_FILES["loadedFile"] ["error"]. "</br>";


    else
    {
        echo "Upload: ". $_FILES["loadedFile"] ["name"]. "</br>";
        echo "Type: ". $_FILES["loadedFile"] ["type"] . "</br>";
        echo "Stored in: " .$_FILES["loadedFile"] ["tmp_name"];
        echo "Size: ". ($_FILES["loadedFile"] ["size"] / 1024). " Kb</br>";

        //Copies file from TEMP_PHP dir to d.default dir
        if (file_exists("." . $_FILES["loadedFile"]["name"]))
        {
            echo $_FILES["loadedFile"]["name"] . " already exists. ";
        }

        else
        {
            move_uploaded_file($_FILES["loadedFile"]["tmp_name"],"." . $_FILES["loadedFile"]["name"]);
            echo "Stored in: " . "upload/" . $_FILES["loadedFile"]["name"];
        }
    }
} 

For some reason it doesn’t work, my scrip keeps going to this code:

echo $_FILES["loadedFile"]["name"] . " already exists. ";
  • 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-28T13:44:14+00:00Added an answer on May 28, 2026 at 1:44 pm

    You need to use POST as well as change “enctyped” to “enctype”.

    <form action="upload.php" method="POST" enctype="multipart/form-data">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am initializing file upload using the following HTML: <form enctype=multipart/form-data action=PHPScripts/upload.php method=POST> <input
I have the following html code : <form name=uploadForm action= method=POST enctype=multipart/form-data> <input type=file
Right now i'm using the below method to Upload a file to PHP <form
I used the codes(html+php script) below to upload image file submit.html <html> <body> <form
In my HTML code, I have a form tag that contains two input boxes,
i have create a form (so it's PHP and HTML hybrid-code). it has ability
Here's my code for registerFormOne.php : <html> <head> <title>Registration Form - 1 of 2</title>
I am trying to upload a file from a php form. I have verified
I want to pass php variable value as a action to html form. I
below is my simple code using HTML 5 multiple file upload. All i need

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.