I have a script to upload an image and display it. When i choose an image and click upload, it doesn’t update the current image, but if i press f5 it will change the current image… thank you very much in advance. im just new in php.
<br><br><a href=\"javascript:location.reload(true);\"><input type='submit' name=save value=save onClick='alert(\"Profile Updated!\")'></a><input type='hidden' name='id' value=$id>";
your browser is probably reusing the cached image, the best way to fix this is to add a unique tag at the end of the image url e.g.
in php i would generally have some kind of helper to do this e.g(very basic):
**
**
if you are updating the image with javascript try do something like the following:
should do the trick