Мой код:
Код: Выделить всё
$('#fm_reservation').submit(function(){
var days = getTimeDiff();
$.post(base_url+'vehicle/getVehicles',{'vehicle_name':vehicle_name,'days':days},function(data){
});
return false;
});
Код: Выделить всё
public function getVehicles(){
$vehicle_name = $this->input->post('vehicle_name');
$days = $this->input->post('days');
$where = array('vehicle_name'=>$vehicle_name);
$vehicle_arr = $this->almana_model->getVehicles($where);
$data['vehicle_arr'] = $vehicle_arr;
$this->load->view('vehiclec/vehicle.html');
}
Подробнее здесь: https://stackoverflow.com/questions/287 ... query-post