I am testing the file format of an image to upload. For some reason it is stil passing as file not in the list
Code:
$testimgformat=explode('.',$img1_name);
$imgformat=$testimgformat[sizeof($testimgformat)-1];
if (!($imgformat==jpg) || !($imgformat==gif) || !($imgformat==JPG) || !($imgformat==GIF) || !($imgformat==bmp) || !($imgformat==BMP))
{$er=$er+1;
echo "<center><font color='red'>Your file must be of jpg, bmp or gif format.</font><br></center>";}
Any help appreciated.
__________________
Matt
webmaster of Please login or register to view this content. Registration is FREE - Online wedding planning
|