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

  • SEARCH
  • Home
  • 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 8841299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:40:51+00:00 2026-06-14T10:40:51+00:00

This is the most strange error I have seen in my life, because yesterday

  • 0

This is the most strange error I have seen in my life, because yesterday it was working and I wake up today and it’s not working this is the error:

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Purchase::$purchase_model

Filename: controllers/purchase.php

Line Number: 67

Here is the controller code
class Purchase extends CI_Controller {

function __construct()
{
    parent::__construct();
    $this->load->model('purchase_model', 'user_model');
    $this->load->helper(array('form', 'url'));
    $this->load->library(array('form_validation', 'upload'));
}   

 function steptwo()
{   
    if($this->input->post('templateid') == NULL){
        redirect('templates');
        }
    $data =$_POST;
    if($this->session->userdata('userName')){
    $data['name']=$this->session->userdata('userName'); 
    }else{ $data['name'] = NULL;}
    $data['paymentplans'] = $this->purchase_model->GetPplan(array('id_template_type' => $_POST['idtype']));
    $this->load->view('step-two', $data);
}

An here is my model code:

   class Purchase_Model extends CI_Model
    {
        function GetPplan($options = array())
{
    // Qualification
    if(isset($options['id_template_type']))
        $this->db->where('id_template_type', $options['id_template_type']);

    // limit / offset
    if(isset($options['limit']) && isset($options['offset']))
        $this->db->limit($options['limit'], $options['offset']);
    else if(isset($options['limit']))
        $this->db->limit($options['limit']);

    // sort
    if(isset($options['sortBy']) && isset($options['sortDirection']))
        $this->db->order_by($options['sortBy'], $options['sortDirection']);


    $query = $this->db->get("template_payment_plan");

    if(isset($options['count'])) return $query->num_rows();

    if(isset($options['template_payment_planid']) || isset($options['detail']))
        return $query->row(0);

    return $query->result();
}    
 }

I already have done this $autoload[‘libraries’] = array(‘database’, ‘session’); so I don’t think this was the problem.

If anyone know what can the error be I’ll be really grateful

  • 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-14T10:40:52+00:00Added an answer on June 14, 2026 at 10:40 am
    $this->load->model('purchase_model', 'user_model');
    

    Here you load purchase_model that you call user_model, if you want load two models, make this :

    $this->load->model('purchase_model');
    $this->load->model('user_model');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is probably the most strange thing I have ever seen in Java: The
I have strange error, when I try to import numpy: Traceback (most recent call
I am getting this strange error on PHP 5.3.1 on Apache 2.2.14. I went
This is most likely not an easy one but here is the situation: I
I've been working on this problem most of the morning and I think I
When error occured Python prints something like this: Traceback (most recent call last): File
I started working on same project recently and I have noticed some strange problem
I am experiencing some strange behaviour with MySQL. I have a table, not large,
I've encountered with some strange problem. It's strange for me because I don't understand
I have come across a strange problem with Zend_Framework, I can not load forms

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.