Welcome Guest, Not a member yet? Register   Sign In
Image upload problem
#4

[eluser]TheFuzzy0ne[/eluser]
Sorry, I thought that the upload library overwrites existing images by default. It turns out that it doesn't. Even still, my idea should still work. Just use the user's ID for the image name, which you should be storing in the session anyway. Then you know what to delete, you just need to figure out the extension.

If you only want the query to execute if an image has been uploaded, then why are you executing it before you perform validation? Also, if you're only expecting a single result (since you're grabbing a user by their ID), why are you looping through the results? That should only be returning a single result, or FALSE. I assume this is as obvious to you as it is to me, so perhaps I'm misunderstanding the question?


Messages In This Thread
Image upload problem - by El Forum - 03-21-2013, 09:27 PM
Image upload problem - by El Forum - 03-22-2013, 05:48 AM
Image upload problem - by El Forum - 03-22-2013, 06:31 AM
Image upload problem - by El Forum - 03-22-2013, 07:14 AM
Image upload problem - by El Forum - 03-22-2013, 12:37 PM
Image upload problem - by El Forum - 03-22-2013, 01:13 PM
Image upload problem - by El Forum - 03-22-2013, 03:42 PM
Image upload problem - by El Forum - 03-23-2013, 01:38 AM
Image upload problem - by El Forum - 03-23-2013, 03:00 AM
Image upload problem - by El Forum - 03-23-2013, 03:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB