I have the following code:
name= "a";
value="b"
$.post("ajax.php", {name:value})....
However ajax.php will receive name=b instead of a=b.
How would I make it receive the latter?
var obj = {};
obj[name] = value;
$.post("ajax.php", obj)...
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