problems using Mozilla browser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mcog_esteban
Forum Contributor
Posts: 127
Joined: Tue Dec 30, 2003 3:28 pm

problems using Mozilla browser

Post by mcog_esteban »

hi all.
i have this piece of code to starting uploading images:

Code: Select all

<?php
if ( $_FILES['img']['type'] == "image/gif" || $_FILES['img']['type'] == "image/pjpeg" )

?>
and using Firefox i can't upload jpegs, using IE everything works well
when testing gifs, works well on both.

any ideas why this is not working?
thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

IE sends image/pjpeg, Firefox sends image/jpeg if I remember right.
mcog_esteban
Forum Contributor
Posts: 127
Joined: Tue Dec 30, 2003 3:28 pm

Post by mcog_esteban »

i have changed to image/jpeg in Firefox and still not working.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

seems to work for me.
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

mcog_esteban wrote:i have changed to image/jpeg in Firefox and still not working.
i would think the obvious solution would be to
echo $_FILES['img']['type'];

and see what it is...
Post Reply