![]() |
![]() |
--armind-- |
![]() ![]()
Post
#1
|
Goście ![]() |
Witam, mam pewien problem z którym nie moge sobie poradzić. Jest on dosc banalny ale "jednak" nie potrafie.
Chodzi o te komunikaty wyswietlające się: Działa tylko to pierwsze "data" drugie już sie nie wyświetla, prosił bym o pomoc. [php][ public function edit() { if ($this->input->post('profil') || $this->input->post('haslo')) { $this->load->library('form_validation'); $this->form_validation->set_rules('name', '', 'trim|required|xss_clean'); $this->form_validation->set_rules('dd', '', 'trim|xss_clean'); $this->form_validation->set_rules('mm', '', 'trim|xss_clean'); $this->form_validation->set_rules('yy', '', 'trim|xss_clean'); $this->form_validation->set_rules('city', '', 'trim|xss_clean'); $this->form_validation->set_rules('email', '', 'trim|xss_clean|valid_email'); $this->form_validation->set_rules('gg', '', 'trim|xss_clean'); $this->form_validation->set_rules('music', '', 'trim|xss_clean'); $this->form_validation->set_rules('zainteresowania', '', 'trim|xss_clean'); $this->form_validation->set_rules('day', 'day', 'required|xss_clean'); $this->form_validation->set_rules('month', 'month', 'required|xss_clean'); $this->form_validation->set_rules('year', 'year', 'required|xss_clean'); $this->form_validation->set_rules('pass','Password','trim|required|min_length[4]|max_length[32]'); $this->form_validation->set_rules('pass_c','Reenter Password','trim|required|min_length[4]|max_length[32]|matches[password]'); if($this->input->post('day') == 0 || $this->input->post('month') == 0 || $this->input->post('year') == 0) { $this->session->set_flashdata('data', 'Proszę sprawdzić datę urodzin.'); redirect('profile/index'); } if($this->input->post('pass') != $this->input->post('pass_c')) { $this->session->set_flashdata('pass', 'Podane hasła nie są takie same.'); redirect('profile/index'); } else { $id = $this->session->userdata('user_id'); if ($this->input->post('pass') != '' && $this->input->post('pass_c') != '') { $data['pass'] = md5($this->input->post('pass')); } $data['name'] = $this->input->post('name'); $data['user_dd'] = $this->input->post('day'); $data['user_mm'] = $this->input->post('month'); $data['user_yy'] = $this->input->post('year'); $data['city'] = ($this->input->post('city')!='' ? $this->input->post('city') : NULL) ; $data['email'] = ($this->input->post('email')!='' ? $this->input->post('email') : NULL) ; $data['gg'] = $this->input->post('gg'); $data['music'] = ($this->input->post('music')!='' ? $this->input->post('music') : NULL) ; $data['zainteresowania'] = ($this->input->post('zainteresowania')!='' ? $this->input->post('zainteresowania') : NULL) ; $this->Profile_model->editUser($data, $id); redirect('profile/index'); } } else redirect('profile/index'); }/php] |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 13.08.2025 - 23:24 |