I have this code that helps me to open a file input when I click on an image:
HTML/PHP:
<label for="img-input">
<img src=<?php echo "".$file[$n].""; ?> class="canvas-1">
<div class="alert-success pad-top-bottom text-center"><strong><?php echo basename($file[$n]); ?></strong></div>
</label>
<input type="file" id="img-input">
where "$file[$n]" is the address of the file on the server folder. There is a bunch of image that are rendered on the screen and when I click on one them, the file input opens. That is ok. What I would like to do is that when I select a image from the file input by clicking on a specific image, The selected image should replace the image I clicked before.
I read many uploading solutions with JQuery but none provided the solution I wanted. Do someone know a way to handle that?
Thanks in advance.