Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8942531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:32:16+00:00 2026-06-15T11:32:16+00:00

For some reason i cant get my model to work.. never had this problem

  • 0

For some reason i cant get my model to work.. never had this problem before.

function overview($userid)
{

    // Load needed model
    $this->load->model('budget_model');
    $data['month_budget'] = $this->budget_model->get_monthly_budget($userid);

    if(isset($_POST['submit']))
    {

        foreach($_POST as $key => $value)
        {

            if(is_numeric($key))
            {
                $this->buget_model->update_buget($key,$value);
                echo "DONE";
            }

        }       

        echo "<pre>";
        print_r($_POST);
        echo "</pre>";
    }

    $data['main'] = 'super_admin/budget_edit_overview_view';
    $this->load->view('default/main_view',$data);

}

The model works fine with “$this->budget_model->get_monthly_budget($userid);” but i keep getting thir error,

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Admin::$buget_model

Filename: controllers/admin.php

Line Number: 166

Fatal error: Call to a member function update_buget() on a non-object
in /Applications/MAMP/htdocs/therace/application/controllers/admin.php
on line 166

The model method,

function update_buget($id,$budget)
{

    $this->db->where('id', $id);

    // Update the month budget
    $data = array(
        'month_goal' => $budget
    );

    $this->db->update('budget_month', $data);

    return true;

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T11:32:19+00:00Added an answer on June 15, 2026 at 11:32 am

    You have made a typing error in line 166.

    It is $this->budget_model->update_buget($key,$value);

    not $this->buget_model->update_buget($key,$value);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason I can't get this to work. It pulls the name and
For some reason I can't get this script to run when I add the
I can't get TryGetValue to work for some reason. Dictionary<String,String> testdict = new Dictionary<String,String>();
This one seems painfully obvious to me, but for some reason I can't get
For some reason i can't get the variable 'total' to define at all... I
I'm new to Javascript and for some reason I can't get the following code
I know PHP 5 already supports SQLite but for some reason I can't get
I'm fairly new to JQuery and for some reason I can't get the currently
I made a header image, but for some reason I can't get it to
For some reason, I can't get pyglet to draw sprites. Here's my code: import

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.