I have a php page called template.php and i have a logo and when clicking on that it will change the logo image by selecting image file, am giving some manipulations in that page ,and sends data to my controller and then to model ,from there i am storing the data(the image)to my upload folder In code igniter framework.And then i redirect to the template.php page that i done all the manipulations ,The image is in the upload folders ,but when i am giving in the page uploads/image.png” is not working ,But after refreshing the page using ctrl+R Its getting the image replaced on the correct place in the logo ,How to resolve this by loading the image without refreshing by pressing ctrl+R ?? since i have to get it work through javascript ??Is that php code not working or its not loading the image from resources ??
Share
you need to use javascript and either preload all of the images, or use AJAX and call the image to be loaded.
This is because all php is executed on the server (server side script) and needs refreshing before it is sent to the browser. use a client side script (javascript) to execute it in the browser. AJAX can be a combination. the client side script calls a server side script and then gets the response