Hi,
I'm asking a user to upload a file and im checking to see if the file type is one of the allowed types. I have an array which is defined as:
$allowed = array(".jpg");
I then check to see if the file type is the same as the allowed type else I display an error message.
if(!in_array($file1_type,$allowed)) {
echo "ERROR";
exit;
}
The problem is that it always displays an error even if the file is of type jpg. the $file1 is the file variable I get from a form.
Your help is apprecaited.
Greg