i tried to send data from view to controller , but nothing work "ajax return error" i try all ways those i see in other similar question My view:
var pdata ={
"latitude": lat,
"longitude": log
};
latlog = "/"+1;
$.ajax({
url: "<?php echo base_url(); ?>index.php/users/search"+CityINP+distINPx+CategoryINP+textINP+latlog,
type: "POST",
data: pdata,
dataType: "JSON",
success: function (data) {
// if success reload ajax table
alert("success");
// reload_table();
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Error adding / update data');
}
});
my controller:
public function search($city=null,$dist=null,$cate=null,$text=null,$latlon=null)
{
}
/between the parameters