I am trying to return an image when Ajax is done, but i don't know how to include a session variable in the response, this is my code:
$(document).ready(function(){
$("#process").click(function(){
$.ajax({
type: 'POST',
url: 'process.php',
success: function (msg) {
$('#new-image').html('<img src="uploads/img/$_SESSION["sess_img"];" class="img-upload" alt="new image">')
}
});
});
});
Then, I want show the image $_SESSION["sess_img"];
within the div #new-image