Need assist Filtering Comments/Returning Errors to appropriate view. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Need assist Filtering Comments/Returning Errors to appropriate view. (/showthread.php?tid=18824) Pages:
1
2
|
Need assist Filtering Comments/Returning Errors to appropriate view. - El Forum - 05-19-2009 [eluser]dancrew32[/eluser] updated, entered blah in 'comments' and blah in 'author' outputs this.png Code: A PHP Error was encountered (with the <?php echo form_open('movie/comments'); ?> added) I need to assign something to $data still huh? Need assist Filtering Comments/Returning Errors to appropriate view. - El Forum - 05-19-2009 [eluser]Thorpe Obazee[/eluser] Code: private function _insert_comment() or Code: private function _insert_comment() The error occurred because there wasn't any $data variable set. Need assist Filtering Comments/Returning Errors to appropriate view. - El Forum - 05-19-2009 [eluser]dancrew32[/eluser] Code: function comments() Whew. This works. It's not terribly good looking, but seems to work for all conditions, filters xss, doesn't do htmlspecialchars yet (I'm not sure prep_for_form is what I should be using..) I just have to get it to report errors back to this: Code: <p><?php echo $this->form_validation->error_string; ?></p> Thank you for the major help! You rule. Need assist Filtering Comments/Returning Errors to appropriate view. - El Forum - 05-19-2009 [eluser]Thorpe Obazee[/eluser] No problem. Btw, I'd use validation_errors() in the view instead of $this->form_validation->error_string. |