public function editAction() { $Car = new Cars(); $this->view->data = $Car->getCategory(); $new_model = $this->request->getPost('model'); $new_marka = $this->request->getPost('marka_id'); $new_opis = $this->request->getPost('opis'); $id = $this->request->getPost('id'); $is_photo = $this->request->getFiles('zdjecie'); if ($new_model == NULL && $new_marka == NULL && $new_opis == NULL && $is_photo == NULL) { $this->view->display('edit'); } else { $Car->updateCar($new_model, $new_marka, $new_opis, $is_photo, $id); header('location:' . Url::getUrl('car', 'list', array('status' => 6))); } }