Notice this post:
One solution was to do this:
down vote
$(function(){
setInterval(function(){
$("#refresh").load("user_count.php");
}, 10000);
});
All this does is it talks to user_count.php to GET data. The .php file then sends that back to be printed out on the page. But say I wanted to also send data to the .php file for it to do stuff with. So like I defined two variables in the javascript code, then wanted the value of each variable to be sent to that php script for processing. What’s the syntax for that?
You can add it to the URL:
BTW – these are JavaScript variables, not “AJAX variables”.