Chodzi mi o tą linijke:
if ($this->input->post('profil') || $this->input->post('haslo')) {
Nie mogę sobie z tym poradzić
public function edit() { if ($this->input->post('profil') || $this->input->post('haslo')) { $data['title'] = "Edit User"; $this->form_validation->set_rules('username', 'Username', 'trim|required|xss_clean|callback_username_check'); $this->form_validation->set_rules('year', 'Year', 'trim|xss_clean'); $this->form_validation->set_rules('month', 'Month', 'trim|xss_clean'); $this->form_validation->set_rules('day', 'Day', 'trim|xss_clean'); $this->form_validation->set_rules('city', 'City', 'trim|xss_clean'); $this->form_validation->set_rules('gg', 'Gadu-Gadu', 'trim|xss_clean'); $this->form_validation->set_rules('music', 'Music', 'trim|xss_clean'); $this->form_validation->set_rules('email', 'Email Address', 'trim|required|valid_email'); $this->form_validation->set_rules('zainteresowania', 'Zainteresowania', 'trim|xss_clean'); $this->form_validation->set_rules('password', 'Password', 'required|matches[password_confirm]'); $this->form_validation->set_rules('password_confirm', 'Password Confirmation', 'required'); if ($this->form_validation->run() == FALSE) { $data['message'] = (validation_errors() ? validation_errors() : ($this->session->flashdata('message'))); $id = $this->session->userdata('user_id'); $data['user'] = $this->Profile_model->getUser($this->session->userdata('user_id')); $this->load->view('profile', $data); } else { $id = $this->session->userdata('user_id'); $this->Profile_model->editUser($data, $id); redirect('profile/index'); } } else redirect('profile/index'); }