I’m trying to check and make sure that the file type being uploaded is gif, png, jpg, or jpeg.
I have this:
[php]
$type = $_FILES[‘uploaded’][‘type’];
if ($type != “image/png”) {
echo “File type not supported.”;
}
else {
//upload
}
[/php]
It works fine because I’ll upload a png and it goes through and when i try to upload something else it doesn’t
But when I try to do this:
[php]
if ($type != “image/png” || $type != “image/jpeg” || $type != “image/jpg” || $type != “image/gif”) {
[/php]
It doesn’t work for anything. What am I doing wrong?