I have been trying to restrict the uploading of images based on size and format.
At the moment I have the size working but not the format.
Ive tried different code but im favouring something like this:
if($_FILES['file_image']['type'] == "image/pjpeg") {
CORRECT FORMAT
else {
INCORRECT FORMAT
}
Any ideas what im doing wrong?
Note: Im trying to upload a jpg at the moment possibly gif and jpeg later on but the file when i view the [type] it comes out as pjpeg (for the jpg) hence i use that to validate it.
Thanks, Regards X