Hi guys
I have a problem in calling a function from a function. These are the two functions:
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);
}
I am trying to call the function Company name in previous function. Can anyone guide me?