我想通過使用從視圖到控制器的鏈接傳遞一些數據。從視圖傳遞數據到控制器(codeigniter)
控制器:
public function details(){
echo $this->input->post('data_id');
$data['details'] = $this->wapi_db->details($this->input->post('data_id'));
$data['latest_news'] = $this->wapi_db->latest_news();
$data['main_content'] = "category/details";
$this->load->view('includes/template',$data);
}
查看:
<a href=<?php.base_url().'wapi/details?data_id='6'; ?>