So I have the following code that someone else helped me get:
function updateEpisodeSeen() {
var anime_id = <? php echo $anime_id; ?> ;
var anime_list_entry_id = <? php echo $anime_list_entry_id; ?> ;
jQuery.post("/path_to_it/my_php_file.php", {
firstParam: anime_id,
secondParam: anime_list_entry_id
}, function (data) {
//this is your response data from serv
console.log(data);
});
return false;
}
Now the .php file that is ran, I update some information and echo two variables out.
So in the console.log(data);
those two variable values are shown properly. I am just wondering how I can show these values in my actual php code? Since these values are updated on the backend, I want to show the users their updated values on the front end as well. So if I could possibly set a php variable to those responses and then echo those instead, but php code isn't ran until a page refreshes so that might not be the way to go since I want the values to update without the page refreshing.