function addsubmitAction() { if ($this->request->isPost() !== false) { $activities = new Activities(); $system_id = $this->request->getPost('system_id'); $activities->start_hour = $this->request->getPost('start_hour'); $activities->finish_hour = $this->request->getPost('finish_hour'); $activities->description = $this->request->getPost('description'); $activities->date = $this->request->getPost('date'); $activities->system_id = $system_id; $activities->modules_id = $this->request->getPost('modules_id'); $activities->bugs_id = $this->request->getPost('bugs_id'); $activities->employees_id = 105; # print_r($this->request->getPost()); # exit(); if ($activities->save() == false) { foreach ($activities->getMessages() as $message) { $this->flash->error((string) $message); } } else { $this->flash->success('Add New Activity Success'); $this->response->redirect('activity/system/' . $system_id); } } }