I have this PHP:
$response = 'success';
$response = json_encode($response);
echo $_GET['callback'] . '('.$response.')';
and this jQuery:
$.ajax({url: "/*url*/?invite="+getinvite+"&api="+api, dataType:"jsonp",
success: function(response){/*do stuff*/}});
On XAMPP on my laptop it was working great. Then when I put it on my server it gives me this error: Undefined index: callback
.
Why is it not letting me set $_GET['callback']
? and how would this problem be fixed?