comparison operators
| From: | Heidi Belal | Date: | Mon, 21 May 2001 06:03:59 +0000 |
| Subject: | comparison operators | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-53675@lists.php.net to get a copy of this message | ||
Hi All,
I have a form where i let people choose a file to
upload, but i want to limit them to image files only.
So i want to only allow the .gif and .jpg to be
uploaded. What i tried doing was this:
if ($filename_type == "image/gif")
-- upload file
otherwise give an error message!
but for some reason this doesn't work. It uploads any
kind of file without complaint! So what am i doing
wrong? Is there another operator to compare strings
for instance? Or what is the problem?
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/