Hello Jeff,
Sunday, August 26, 2001, 9:17:45 PM, you wrote:
JO> I want to check if an uploaded file is an image. This isn't working.
JO> Could anyone help me out?
JO> if (!eregi("\\.gif$", $img1_name) ||
JO> !eregi("\\.jpg$", $img1_name) ||
JO> !eregi("\\.jpeg$", $img1_name)) {
JO> error message
JO> }
You can find out type of uploaded file like this:
if ($img1_name_type=='gif') {
image is gif do this
}
else {
image is not gif do that
}
I hope it helps
--
Best regards,
Daniel mailto:[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]