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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:17:56+00:00 2026-06-04T23:17:56+00:00

My code was uploading video files, but after I extended the form it stopped

  • 0

My code was uploading video files, but after I extended the form it stopped uploading. All the other variables were passed OK but not the file variable was blank.

I tried comparing the upload logic with similar examples on the web but could not see what I had changed to cause it to fail. In the listing below I have removed all the irrelevant code. When this code runs it returns “Error”.

<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
if (isset($_FILES['urlvideo'])) {
  move_uploaded_file($_FILES['urlvideo']['tmp_name'], "{$_FILES['urlvideo']['name']}");
} else {
  echo('Error');
  exit();
}
?>  
<!DOCTYPE HTML>
<html>
  <body>
    <form action="videotest.php"
          method="post"
         enctype="multipart/form-data">   
      Upload video:
      <input type="file" name="urlvideo" /><br>
      <input type="submit"
            value="Submit"/>
    </form>
  </body>
</html>
<?php ob_end_flush(); ?>

Thank you for taking the time to read this.

  • 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-04T23:17:59+00:00Added an answer on June 4, 2026 at 11:17 pm

    use this code.

    <?php
    error_reporting(E_ALL);
    ini_set('display_errors', '1');
    if ( $_POST ) {
        if (isset($_FILES['urlvideo'])) {
          move_uploaded_file($_FILES['urlvideo']['tmp_name'], "{$_FILES['urlvideo']['name']}");
        } else {
          echo('Error');
          exit();
        }
    }
    ?>  
    <!DOCTYPE HTML>
    <html>
      <body>
        <form action="testup.php"
              method="post"
             enctype="multipart/form-data">   
            <input type="hidden" name="method" value="post" /><!-- for check $_POST before if isset $_FILES-->
          Upload video:
          <input type="file" name="urlvideo" /><br>
          <input type="submit"
                value="Submit"/>
        </form>
      </body>
    </html>
    

    it is because you put if ( isset( $_FILES before showing the form.

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

Sidebar

Related Questions

I'm using an Ajax code for uploading files. Django takes good care of file
I want to upload video using uploadify newest version, but I failed. My code:
I've simplified my code for uploading a file without iFrame or flash engine, and
i have an issue with uploading multiple files to disk. here is my code.
I am uploading a video file using an Async Task. To track the progress
I'm building a site that has a video uploading. I want all the videos
This is my code for uploading database backup file to SkyDrive. Program is breaking
I want to upload .3gp video files to server via PHP code. I checked
I am writing code for uploading a file from a client to my server
Basically I want to upload image and Video file with an html form. Image

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.