Welcome Guest, Not a member yet? Register   Sign In
Forms and Databases (Best Practice)
#5

[eluser]jpeffer[/eluser]
I generally use the field names defined within my form validator definition to extract only those fields from the POST. Something like the following:
Code:
// Remove keys from the registration_data array that were not validated
$registration_data = array_intersect_key($registration_data, $this->CI->form_validation->_field_data);

$registration_data is set as the method parameter in my authentication lib. All I then have to do from the controller is simply pass the $_POST array.... done


Messages In This Thread
Forms and Databases (Best Practice) - by El Forum - 03-12-2009, 10:14 AM
Forms and Databases (Best Practice) - by El Forum - 03-12-2009, 08:24 PM
Forms and Databases (Best Practice) - by El Forum - 03-13-2009, 06:30 AM
Forms and Databases (Best Practice) - by El Forum - 03-13-2009, 08:50 AM
Forms and Databases (Best Practice) - by El Forum - 03-13-2009, 10:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB