Re: [PHP] checking image extensions

2001-02-18 Thread Hrishi
if ((substr($imgName, -4) != ".jpg") || (substr($imgName, -4) != ".gif")) this case, in plain english is : if ext is not jpg, OR if ext is not gif, error the ext will never be both jpg and gif at the same time, so you're looking for the condition: if ((substr($imgName, -4) != ".jpg")

RE: [PHP] checking image extensions

2001-02-18 Thread ..s.c.o.t.t..
{ print "file format is not supported!"; } -Original Message- From: John Vanderbeck [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 17, 2001 08:27 To: Alvin Tan; Php-General Subject: Re: [PHP] checking image extensions Hi, Newbie question here. I'm trying to write

[PHP] checking image extensions

2001-02-17 Thread Alvin Tan
Hi, Newbie question here. I'm trying to write a function to check an image extension, part of the code is: if (substr($imgName, -4) != ".jpg") my question is what's the syntax for adding (or) ".gif" to this? TIA @lvin -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] checking image extensions

2001-02-17 Thread John Vanderbeck
Hi, Newbie question here. I'm trying to write a function to check an image extension, part of the code is: if (substr($imgName, -4) != ".jpg") if ((substr($imgName, -4) != ".jpg") || (substr($imgName, -4) != ".gif")) { echo "P CLASS=ErrorI'm sorry, but the ikmage format you submitted is not