you don't have to use php use simple javascript, unless your'e reloading the page then I would suggest using GET or POST.
so maybe try that the responce text will be in a variable named serverData:
Code:
if (xmlHttp.readyState==4){
serverResponse=xmlHttp.responseText;
callback(serverResponse);
}