I have a problem with file extensions in php.
if ($_FILES['file']['type'] != 'image/png' || 'image/jpg') {
echo "wrong type";
exit;
}
this doesn't allow any type of file to upload
if ($_FILES['file']['type'] != ('image/png' || 'image/jpg')) {
echo "wrong type";
exit;
}
this allows any type of file to upload.
Whats the matter?