Form Validation |
[eluser]Mareshal[/eluser]
first of all, even you copied the text wrong, or this is your real code. 1# you don't have a constructor in your controller: http://ellislab.com/codeigniter/user-gui...nstructors 2# you didn't initialize your db library and form_validation: http://ellislab.com/codeigniter/user-gui...mples.html http://ellislab.com/codeigniter/user-gui...ation.html 3# to display error individually, <?=form_error('you_field_name')?> 4# if you don't use global XSS_CLEAN = TRUE in your config, do not trow all your post in database $this->db->insert('contacts',$_POST); //NO either you use after "required|xss_clean" or you use something like this: $post['your_field_name'] = $this->input->post('your_field_name', TRUE); //TRUE is for xss_clean good luck |
Messages In This Thread |
Form Validation - by El Forum - 09-06-2009, 01:53 AM
Form Validation - by El Forum - 09-06-2009, 02:07 AM
Form Validation - by El Forum - 09-06-2009, 06:03 AM
|