I have a site that will allow a user to update their profile.

The problem im having is that it says the my updateProfile() function in my database model is there even though it is.

Why? i loads other functions like updateShow()

Quote:Fatal error: Call to undefined method Database::updateProfile() in /Users/User1/Sites/ci/system/application/controllers/members.php on line 307

function updateProfile($id)
        $data = array(
            'first' => $this->input->post('first'),
            'last' => $this->input->post('last'),
            'username' => $this->input->post('username'),
            'position' => $sthis->input->post('position'),
            'bio' => $this->input->post('bio'));

        $this->db->where('id', $id);
        $query = $this->db->update('users');
        if ($query) {
            return $data['updated'] = TRUE;
            return $query;
            return $data['updated'] = FALSE;

function update()
        $this->database->updateProfile($this->uri->segment(3)); //this is line 307

Do you by any chance run PHP4? If so database is a reserved name and you should name your model something else.

nope im running it on a local server with PHP 5

it work ever other place i use function from it

i fixed it. It was a bracket that was out of place

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.