I have created a PHP script functionexchangeRate($exchangeFrom, $exchangeTo)
that uses uses two parameters.
I am trying to call this PHP script with Jquery's $.get function but I can not figure out how to send the two parameters (I feel like a turkey – pun intended).
var getRate = $.get('exchangeRate.php', function(data){
});
Best Solution
you have to use a callback, or call it synchronously:
to make things synchronous you need something like
Also, I guess your PHP is right, with something like