I have 2 variables, var selectPartiNo = ‘2’; and var event_id = “4”; , I am currently passing it’s value into my php file like url: ‘data11.php?event_id=’ + event_id + ‘&selectPartiNo=’+selectPartiNo+‘’, … Is there any other method to pass these variable values ???
processClick: function () {
var selectPartiNo = '2';
var event_id = "4";
ko.applyBindings(viewModel, $("#registrationWrap")[0]);
$.ajax({
type: 'POST',
url: 'data11.php?event_id=' + event_id + '&selectPartiNo='+selectPartiNo+'',
data: { json: ko.toJSON(viewModel) },
eventID:"+event_id+",
success: function (result) {
alert(result);
}
});
}
In data11.php code is like below
echo "Event id : ".$_GET['event_id']."<br>";
echo "Selecte Number : ".$_GET['selectPartiNo']."<br>";