I am just wondering, is there a way to pass the parameters to php method from an ajax call? This is what I had in mind but it does not work.
$.ajax({
type: "POST",
url: "?do=saverates",
data: {"siteId": siteId, "portId": portId},
dataType: "json",
async: true,
success: function(jsonObj) {}
});
php method:
public function saveRates($siteId, $portId){
echo "$siteId : $portId";
}
You deal with the in PHP the same way as you deal with any data from an HTTP request.
etc.