<?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.
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.