Posted by Angelos on 07/20/05 16:43
Hello there...
I am trying to Create a script that uploads multiple files (that doesn't
really matter)
So I am looping trough the $_FILES[files][name]
while(list($key,$value) = each($_FILES['files']['name']))
{
echo $value.' ';
echo $_FILES['files']['type'][$key];
}
While I am in the loop I want to check if the file is an image or another
file and call the appropriate script.
if ($_FILES['files']['type'][$key])
upload_image();
else
upload_file();
My question is how can I check if the file is an image ?
NOTE: I have two different functions to upload files because the
upload_image() creates thumbnales and resizes an image.
Thanks for your Time !
[Back to original message]
|