Hi,
I've uploaded files successfully, but now I would like to filter files to only accept JPGs.. so I use the following for example...
$userfile = $HTTP_POST_FILES['userfile']['name'];
$type = $HTTP_POST_FILES['userfile']['type'];
$size = $HTTP_POST_FILES['userfile']['size'];
$location = $HTTP_POST_FILES['userfile']['tmp_name'];
if($type == "images/pjpeg" or "images/jpg"){
move_uploaded_file($location, "./images/$userfile");
echo("uploaded successfuly....");
}
else
{
echo("wrong file type...");
}
THe problem is, it lets any file through...
Anyone have suggestions?