View Single Post
Old 05-29-2008, 06:57 PM   #11 (permalink)
Jmz
The Acquainted
 
Join Date: Oct 2007
Location: Newcastle, UK
Posts: 113
Thanks: 3
Jmz is on a distinguished road
Default

To check the mime type I'm using:

Code:
$mimetypes = array('image/jpeg', 'image/png', 'image/pjpeg', 'image/gif');
$mimetype = strtolower($_FILES['uploadedfile']['type']);
if (in_array($mimetype,$mimetypes)){
//do upload photo stuff
}else{		
echo "File format not recognised (mime) - $mimetype";	
}
I added the "$mimetype" to the error so I could see what it was comparing to the array but it just comes up blank.
__________________
Free CSS Tutorials
Send a message via MSN to Jmz
Jmz is offline  
Reply With Quote