Unable to change the location of a file

One problem could be that you’re missing

 ***<img class="srcimage" src=server-side4.php/>***

Change it to

***<img class="srcimage" src="http://example.com/your-path/server-side4.php" />***

Then if that doesn’t fix it, try outputting your variables to see what you’re working with. Make sure that all these values are giving you the results you’re expecting.

console.log(base);
console.log(jQuery("#realtime-form").serialize());
console.log(jQuery(".preview img"));

If you don’t want the src to be dynamic then remove that line of JavaScript.