Need assist Filtering Comments/Returning Errors to appropriate view. |
[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?
[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.
[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.
[eluser]Thorpe Obazee[/eluser]
No problem. Btw, I'd use validation_errors() in the view instead of $this->form_validation->error_string. |
Welcome Guest, Not a member yet? Register Sign In |