Reputation: 2257
Below code post myid variable to url.php.
$.ajax({
url:'url.php' //'url.php,test.php' is invalid
,async: true
,type : 'POST'
,cache: false
,data : 'myid=' + myid
,dataType: 'html'
,success: function(data){
$('body').html(data);
FB.XFBML.parse();
}
}
How can I post it to multiple other files at same moment? I need myid in various files also.
Upvotes: 0
Views: 79
Reputation:
function send(_url) {
$.ajax({
url: _url
,async: true
,type : 'POST'
,cache: false
,data : 'myid=' + myid
,dataType: 'html'
,success: function(data){
$('body').html(data);
FB.XFBML.parse();
}
}
}
['url.php','test.php'].forEach(send);
Upvotes: 1
Reputation: 6878
Maybe in your url.php make a curl POST request to other PHP files as needed
Upvotes: 0