MnilinM Posted February 23, 2007 Share Posted February 23, 2007 So i'm working on a friend's site at work, where i use Firefox. I've got this script lined up to send the name of the file to mySQL, then upload the file. Now, yeah it doesn't totally work yet, but i'm still playing with it (because i'm a newb at php basically). My question pertains to this: When i use firefox, the script only inputs the filename chosen with my type=file input box. When i use IE, the script inserts the WHOLE PATH (C:\folder\picsetc\yougettheidea.jpg) I made another little script to pour out the contents of the mysql table, and sure enough... If i use firefox, it'll list: filename.jpg If i use IE, it'll list: path\filename.jpg Is there something i should include in my script to help IE only put in the filename, and not the path? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 23, 2007 Share Posted February 23, 2007 When you upload the file, you give it a new unique name, yes? Store that name instead of the one submitted by the browser. Quote Link to comment Share on other sites More sharing options...
MnilinM Posted February 23, 2007 Author Share Posted February 23, 2007 Mostly i'm looking at how the file's name is inserted into mysql. If I use Internet Explorer to put in this information into mysql, then when i later call the image from mysql, i get img src="c:\folder\image.jpg" What i don't get is FireFox does just fine, why doesn't Internet Explorer just send the file name and not the path? I'll worry about the actual upload thing later. Right now, i'd rather get this mySQL thing solved. Quote Link to comment Share on other sites More sharing options...
roopurt18 Posted February 23, 2007 Share Posted February 23, 2007 This isn't a MySQL thing. How about posting some actual code? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 23, 2007 Share Posted February 23, 2007 You'll solve it by correcting what you're inserting...as I suggested, when you upload it, you will give it a new name, and that will be the name you store... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.