Brendan Posted July 18, 2006 Share Posted July 18, 2006 Hey, im just curious as to what the best way to upload image files is from an upload form.If i were to upload them directly to a mysql database it would use up the mysql database more than i would want. If i were to upload it to the server and have an entry in mysql which would point to each file, then i'm afraid the files and mysql entries could get mixed up or something to that extent, such as the file being created but having an error where a mysql entry isnt created.Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/14918-image-upload/ Share on other sites More sharing options...
zq29 Posted July 18, 2006 Share Posted July 18, 2006 There is no reason why your files and file references should get mixed up, as always, make sure you validate and escape [i]all[/i] user input to prevent any errors within the query. Quote Link to comment https://forums.phpfreaks.com/topic/14918-image-upload/#findComment-59812 Share on other sites More sharing options...
True`Logic Posted July 18, 2006 Share Posted July 18, 2006 x[) this is why i don't use MySQL, just enumerate file names (0.jpg, 1.jpg, etc), put security on ur uploader so only certain file types are allowed, then enumerate displays with a function (a little while(file_exists("$num.jpg")) { } loop) and bam, you've avoided your problem Quote Link to comment https://forums.phpfreaks.com/topic/14918-image-upload/#findComment-59867 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.