Problems with Validation and $data |
[eluser]EvanCalkins[/eluser]
I'm being introduced to validation here: http://ellislab.com/codeigniter/user-gui...controller The problem I am having is when my form returns FALSE and I use $this->load->view('myview.php'); any of the $data variables that were assigned in the action which originally called myview.php is not passed along and I get Undefined variable errors. I'm sure this is an easy fix... I am just banging my head against the wall on this one. Any help would be appreciated. Here is my method: Code: function reg_insert()
[eluser]EvanCalkins[/eluser]
I now noticed I can solve the problem by including all the $data arrays I've created in my other method into this reg_insert method. This works, but it seems silly to have all this data in two places? Is there a way to quickly pass a data array from one method to another?
[eluser]xwero[/eluser]
You can create a function where you retrieve the data and call this function in both methods. |
Welcome Guest, Not a member yet? Register Sign In |