comparison operators

From: Date: Sun, 20 May 2001 09:30:14 +0000
Subject: comparison operators
Groups: php.general 
Request: Send a blank email to php-general+get-53597@lists.php.net to get a copy of this message
Hi All! i'm creating this form for people to upload pictures, so i want to be able to compare the type of the file, so that if it's not a .gif or a .jpg i give them an error message! What i am using is: If ($userfile_type == "image/gif") - here it uploads the file otherwise it sends out an error message! but the problem i'm having is that even when i try uploading a .txt it accepts it and uploads it without giving the error message. Is there another way to compare strings? or is == operater correct? or what am i doing wrong? thanks! ===== Heidi Belal ICQ# 32127109 A bus stops at a bus station. A train stops at a train station. On my desk I have a work station... __________________________________________________ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

« previous php.general (#53597) next »