Here is a dub question. If this code is supposed to restrict files other than jpg, png and gif, why does it do it? This is for a file browser aplication. The image has to be one of the 3 accepted file extensions.
$ext - is the var that reads the file extensions, such as exe and so on.
if (($ext == "jpg" || "gif" || "png") && ($_FILES["uploaded_file"]["type"] == "image/jpeg" || "image/gif" || "image/png") && ($_FILES["uploaded_file"]["size"] < 1000000)){
echo 'something';
}else(
echo 'none';
)
I really don't see the mistake.