How to assign javascript variable to php $_POST to get the data on same page.
i tried following
var t= timesheetId;//timesheet id is coming from js file
$.ajax({
type:"POST",
data: {'variable': t},
});
How to assign javascript variable to php $_POST to get the data on same page.
i tried following
var t= timesheetId;//timesheet id is coming from js file
$.ajax({
type:"POST",
data: {'variable': t},
});
You need to add a url
to that ajax request so that it sends it to wherever your php file is. right now it's not being sent anywhere