04-05-2011, 03:00 AM
[eluser]Unknown[/eluser]
I am new to CodeIgniter but am having this problem quite a bit. Say I have a controller 'Contacts' and the index() page lists all the contacts... and on this same page I want to have a form to add a contact... The only thing I can do (If I want to print validation errors), is to handle the form in the same controller...
Is there a way of making a new method in the controller... add_contact().. handling the form in that then passing the errors back to the index() controller? Or is this just not a good idea?
I am new to CodeIgniter but am having this problem quite a bit. Say I have a controller 'Contacts' and the index() page lists all the contacts... and on this same page I want to have a form to add a contact... The only thing I can do (If I want to print validation errors), is to handle the form in the same controller...
Is there a way of making a new method in the controller... add_contact().. handling the form in that then passing the errors back to the index() controller? Or is this just not a good idea?