[SOLVED] File upload -> doesn't work with IE?

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

raging radish
Forum Commoner
Posts: 32
Joined: Sun Nov 14, 2004 3:02 pm
Location: Toronto

Post by raging radish »

Still nothing. On another note, I thought that <li> only had to be closed using XHTML?

And I don't think this is quite right either:

Code: Select all

<h3> align="left">Image Upload Page</h3>
...but was ok the way I had it originally.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

Try using the "id" attribute as well.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Yeah that was right, it's getting late lol. The only thing I can think of is that there is a tag confusing ie someplace. What exactly happens when you click upload?
raging radish
Forum Commoner
Posts: 32
Joined: Sun Nov 14, 2004 3:02 pm
Location: Toronto

Post by raging radish »

LiLpunkSkater: the id attribute doesn't help the situation.

agtlewis: The page continues as if nothing unusual has happened. The script returns a message (based on $_FILE error constants) to the user saying if the upload was successful or not. The returned message is that the upload was successful (UPLOAD_ERR_OK), but it was not. No other errors are returned either.
User avatar
mchaggis
Forum Contributor
Posts: 150
Joined: Mon Mar 24, 2003 10:31 am
Location: UK

Post by mchaggis »

I know this may seem obvious and you've probably checked... But:

a) Are you trying to uplad the same file to IE as you are Firefox?
b) Have you checked the file size?

Incedentally:

To garentee posting to your self, just omit the action parameter from the form opening tag.

The forward slashes at the ends of input tags have no impact other than to make your form conform to w3c guidelines that IE ignores.
raging radish
Forum Commoner
Posts: 32
Joined: Sun Nov 14, 2004 3:02 pm
Location: Toronto

Post by raging radish »

mchaggis wrote: a) Are you trying to uplad the same file to IE as you are Firefox?
Yes
mchaggis wrote: b) Have you checked the file size?
Yep
mchaggis wrote: Incedentally:

To garentee posting to your self, just omit the action parameter from the form opening tag.

The forward slashes at the ends of input tags have no impact other than to make your form conform to w3c guidelines that IE ignores.
Thanks, noted for future reference.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Just reinstall windows and be done with it :)
raging radish
Forum Commoner
Posts: 32
Joined: Sun Nov 14, 2004 3:02 pm
Location: Toronto

Post by raging radish »

I think the problem is solved. Near as I can tell, the issue occurred because the script was looking for jpeg files and excluding all others, filetype being verified by the following snippet:

Code: Select all

if ($_FILES['fupload']['type'] == "image/jpeg")
I changed it to:

Code: Select all

if ($_FILES['fupload']['type'] == "image/jpeg" || "image/jpg")
and now it co-operates. Why only IE disapproved of the original is anybody's guess...

I hope my hair will grow back :roll:
Daisy Cutter
Forum Commoner
Posts: 75
Joined: Sun Aug 01, 2004 9:51 am

Post by Daisy Cutter »

I bet it has something to do with the way that IE sends the data.
Post Reply