從函數調用函數時遇到問題。這些是兩個功能:從另一個函數調用函數
function getevents() {
$date = $this->input->post('attendanceDateadd');
$Event = $this->input->post('Event');
$Timing = $this->input->post('Timing');
$CompanyName = $this->input->post('CompanyName');
$EventDescription = $this->input->post('EventDescription');
$res = $this->eventmodel->getevents($date,$Event,$Timing,$CompanyName,$EventDescription);
if($res == true) {
$this->session->set_flashdata('response', 'data added successfully !');
} else {
$this->session->set_flashdata('response','data already exsists !');
}
redirect('EventController/events');
}
function Companyname() {
$data['Companyname'] = $this->eventmodel->getCompanyname();
//print_r($data['Companyname']);
$this->load->view('addevents',$data);
}
我想在前面的函數中調用公司名稱。任何人都可以引導我?
到底是什麼問題
Companyname
?即您得到哪種類型的錯誤? –