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

[eluser]flaky[/eluser]
change
Code:
function update_admin_form()
{
to
Code:
function update_admin_form($user_id=null)
{

then change

Code:
if($this->uri->segment(4))
{

to

Code:
if($user_id != null)
{
    $data['user'] = $this->users_model->get_user($user_id);
}


this

Code:
function update_admin_form()
    {
        $data['title'] = 'Update admin user';
        $data['admins'] = $this->users_model->get_admin_users(); // get list of admin users
    
          if($this->uri->segment(4))
        {
            $data['user'] = $this->users_model->get_user($this->uri->segment(4));
        }
        $this->load->view('includes/header',$data);
        $this->load->view('admin/users/users_view',$data);
        $this->load->view('admin/users/update_admin_view',$data);    
        $this->load->view('includes/footer',$data);
    }

change to

Code:
function update_admin_form()
    {
        $data['title'] = 'Update admin user';
        $data['admins'] = $this->users_model->get_admin_users(); // get list of admin users
    
          if($this->uri->segment(4))
        {
            $data['user'] = $this->users_model->get_user($this->uri->segment(4));
            $this->load->view('admin/users/update_admin_view',$data);
        }
        $this->load->view('includes/header',$data);
        $this->load->view('admin/users/users_view',$data);
          
        $this->load->view('includes/footer',$data);
    }


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