Hi..
Tryed to get $picture_type for uploading only .gif and .jpg files on my serever. Problem that only .gif files can be uploaded, on all other types it shows "wrong file type". Tryed to do this in 2 variants:
1.
<?
if ($picture_type == "image/gif" || $picture_type == "image/jpeg")
{
//upload code...
}
else
{
print "wrong file type";
}
?>
2.
<?
switch($picture_type) {
case 'image/jpg':
$extension='.jpg';
break;
case 'image/gif':
$extension='.gif';
break;
default:
print "wrong type";
}
//upload code...
what wrong with code?