I was wondering if I can do this jquery ajax on my code:
$.ajax({
type: "POST",
dataType: 'json',
url: "functions/ajaxNca_add.php", "functions/ajaxNca_update.php",
data: dataString,
cache: false,
success: function(response){
// show success
alert(response.a);
}
The code above is just an example and I knew that it's not working. How can I call 2 php script in just one ajax request in jquery ? Can someone help ?
No you can not do this. If you will look at jquery ajax documentation, you will see that url accepts only string, not an array of stings.
You should either make two requests, or create another *.php
entry point which will combine both php scripts and make a call to this one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With