First of all let me tell you all I'm very new to js, jQuery & ajax. But I'm very well with PHP.
I got a jQuery script from the internet:
function getMessages (){
$.get('php/chatGetter.php', function(data){
$("#msgbox").html(data);
});
}
setInterval(function(){
getMessages();
}, 500);
});
As you can see it gets data from chatGetter.php page and shows in div whose id is msgbox every 500 millisecond.
I want to send a php variable ($abc ="something";) through function getMessages to chatGetter.php page every time the getMessages function is executed. But I'm not getting how to do that.