Now i am trying to generate a subject based bootgrid table for college.Now its working fine for displaying all the data.But what i want is an advanced search where subject are selected based on branch and semester.I obtain the branch and semester options and inside the syfetch.php function i perform an advanced serach.Here is sending function
$('#semester').change(function(){
var branch=$("#branch").val();
var semester=$("#semester").val();
var formData = new FormData();
formData.append('branch', branch);
formData.append('semester', semester);
var productTable = $('#product_data').bootgrid({
url: "sylfetch.php",
ajax: true,
data:formData,
type:"POST",
post: function(data)
{
return{
id: "b0df282a-0d67-40e5-8558-c9e93b7befed"
};
},
formatters: {
"link": function(column, row) {
return "<a href='" + row.slink + "'>Download</a>";
}
}
});
$('#product_data').bootgrid('reload');
});
Now whenever i try to read the values of semester and branch inside sylfetch.php it stops working
$branch = $_POST["branch"];
$semester= $_POST["semester"];
Now i think there is an error with sending of these variables with ajax so please help me out.