Welcome Guest, Not a member yet? Register   Sign In
Returning to update form after validation
#6

[eluser]Loquela[/eluser]
Thanks for that flaky,

That looks promising. But I still get "undefined variable:data" because the model is expecting the record key in the url segment:

Code:
// Get user model

    function get_user()
    {
        $query = $this->db->get_where('pp_users', array('userid' => $this->uri->segment(4)));
        
        if ($query->num_rows() == 1)
        {
            $data = $query->row();
        }
    
        return $data;
    }

This is because I load the update form initially by clicking on a link in a list of users. So I am gessing I somehow need to get back to the form via the url. But I think if I do that, say redirect, then the validation messages won't appear.

Cheers


Messages In This Thread
Returning to update form after validation - by El Forum - 01-07-2010, 05:46 AM
Returning to update form after validation - by El Forum - 01-07-2010, 06:34 AM
Returning to update form after validation - by El Forum - 01-07-2010, 07:06 AM
Returning to update form after validation - by El Forum - 01-07-2010, 07:18 AM
Returning to update form after validation - by El Forum - 01-07-2010, 07:27 AM
Returning to update form after validation - by El Forum - 01-07-2010, 07:42 AM
Returning to update form after validation - by El Forum - 01-07-2010, 07:48 AM
Returning to update form after validation - by El Forum - 01-07-2010, 08:01 AM
Returning to update form after validation - by El Forum - 01-07-2010, 08:10 AM
Returning to update form after validation - by El Forum - 01-07-2010, 08:12 AM
Returning to update form after validation - by El Forum - 01-07-2010, 10:14 AM
Returning to update form after validation - by El Forum - 01-07-2010, 10:24 AM
Returning to update form after validation - by El Forum - 01-07-2010, 10:29 AM
Returning to update form after validation - by El Forum - 01-07-2010, 10:32 AM
Returning to update form after validation - by El Forum - 01-07-2010, 10:42 AM
Returning to update form after validation - by El Forum - 01-07-2010, 10:59 AM
Returning to update form after validation - by El Forum - 01-07-2010, 11:40 AM
Returning to update form after validation - by El Forum - 01-07-2010, 02:04 PM
Returning to update form after validation - by El Forum - 01-07-2010, 02:10 PM
Returning to update form after validation - by El Forum - 01-08-2010, 03:41 AM
Returning to update form after validation - by El Forum - 01-08-2010, 05:27 AM
Returning to update form after validation - by El Forum - 01-08-2010, 05:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB