RE: [PHP] checking image extensions

2001-02-18 Thread ..s.c.o.t.t..
imgName) ) { 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 > > > >

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-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 "I'm sorry, but the ikmage format you submitted is not a support