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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:43:27+00:00 2026-05-20T16:43:27+00:00

<?php if (($_FILES[fileToUpload][type] == image/gif) || ($_FILES[fileToUpload][type] == image/jpeg) || ($_FILES[fileToUpload][type] == image/png )

  • 0
<?php
if (($_FILES["fileToUpload"]["type"] == "image/gif")
  || ($_FILES["fileToUpload"]["type"] == "image/jpeg")
  || ($_FILES["fileToUpload"]["type"] == "image/png" )
  && ($_FILES["fileToUpload"]["size"] < 10000))
  {
  move_uploaded_file($_FILES["fileToUpload"]["tmp_name"],
    "http://www.nhl-statistics.com/scripts/upload" . $_FILES["fileToUpload"]["name"]);
  }
else
  {
  echo "Files must be either JPEG, GIF, or PNG and less than 10,000 kb";
  }

no matter what i enter it seems to go to the else statement.

  • 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-20T16:43:28+00:00Added an answer on May 20, 2026 at 4:43 pm

    The size is in bytes, not kilobits, you’re only allowing files under the size of 78kb/10kB to be uploaded, but your echo says that files up to 10,000kb can be uploaded.

    You might be uploading too large files.

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

Sidebar

Related Questions

so now i have <?php if (($_FILES[fileToUpload][type] == image/gif || $_FILES[fileToUpload][type] == image/jpeg ||
i saved some .php files on wamp\www . But i can’t see my projects
I have two PHP files that I need to link. How can I link
I am making numerous, minute changes to .php files in Eclipse PDT then committing
I'm writing multilingual website. I have several files on server like: /index.php /files.php /funny.php
I have quite a lot of PHP view files, which I used to include
Is there a static analysis tool for PHP source files? The binary itself can
I am using the singleton pattern in all my PHP class files. Would it
I have a fairly large PHP codebase (10k files) that I work with using
Is it possible to read and write Word (2003 and 2007) files in PHP

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.