I use jquery to call two url in file indexFunctions.php but the response of server is empty i dont know why please help there is my code
$("#start_peering").submit(function(event){
$("#wait").html('<img src="ajax-loader.gif">');
event.preventDefault();
$.ajax({
url : 'indexFunctions.php',
type : 'POST',
data : {peering:true},
success : function(data){
$("#StbStatus").html(data);
$.ajax({
url : 'indexFunctions.php',
type : 'POST',
data : {test_params:true},
success : function(data){
$("#results").html(data);
$("#wait").html('');
}
});
}
});
});
File indexFunctions.php
$rpi="http://192.168.1.15";
if (isset($_POST['peering']) && isset($_POST['test_params']))
{
$url = $rpi."/peering.php?askSTB=true";
$response = proxy::get($url);
echo $response;
$url = $rpi."/installUSBKeyOnStb.php";
$response = proxy::get($url);
echo $response;
}
?>
Thank you in advance.