This looks good but I just have one question about it if you don't mind, what if someone was uploading a gif or a PNG file? can it be made to only detect jpgs? Thanks in advance Deadsam
> Try it this way, it will check if it is a jpeg and it has a horizontal > and vertical size so you can be pretty sure it is an image file. > (you do not need the gd package for getimagesize()) > > > /** Check for the type of the image : only allow jpeg's */ > $im = getimagesize($_FILES['uploadFile'); > if(!($im[2] == 2 && $im[0] > 0 && $im[1] > 0)){ > echo "You can only upload jpg images."; > exit(); > } > > > > > -- > regards, > Tom > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php