note 11485 added to Handling file uploads

From: Date: Thu, 22 Feb 2001 11:29:30 +0000
Subject: note 11485 added to Handling file uploads
Groups: php.notes 
Request: Send a blank email to php-notes+get-11405@lists.php.net to get a copy of this message
I am trying to validate the type of file that can be uploaded to only gif & jpeg using the following: if( ($splashFile!="image/gif") || ($splashFile!="image/pjpeg") || ($splashFile!="image/jpeg") ) { echo "this is not a valid image type"; unlink($splashFile); Any gifs & jpegs I try and upload meets this condition. Any help greatly appreciated. http://www.php.net/manual/en/features.file-upload.php

« previous php.notes (#11405) next »