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 6615979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:31:40+00:00 2026-05-25T20:31:40+00:00

Following is the scenario: I’ve integrated HMVC in CodeIgniter 2.0.2. Created a module with

  • 0

Following is the scenario:
I’ve integrated HMVC in CodeIgniter 2.0.2. Created a module with following structure.

/application/modules/login

/application/modules/login/controllers

/application/modules/login/controllers/login.php

/application/modules/login/models/login.php

/application/modules/login/views/login_form.php

controller/login.php code

class Login extends CI_Controller{
    public function index(){
       //load login form view
    }
    public function authenticate(){
       $model = $this->load->model('login'); //tried with Login
       $model->validate(); //shows error here
    }
}

/views/login_form.php

<form name='LoginForm' method='post' action='/login/authenticate'>

/models/login.php

class Login extends CI_Model{
  public function validate(){
    echo $this->input->post('EmailId');
    echo $this->input->post('Pword');
  }
}

output:
got error indicating undefined method Login::validate()
When created validate() method in controller Login it works. But it shouldn’t happen.. even though I’m loading a model with name Login why it points to Login Controller.

Can anyone could help me out. The way I did is it correct? Suggestions welcomed…

  • 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-05-25T20:31:41+00:00Added an answer on May 25, 2026 at 8:31 pm

    You are loading and accessing your model incorrectly. Take a look at the documentation for more examples.

    Change your authenticate() method to:

    public function authenticate() {
        $this->load->model('login');
        $this->login->validate();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following scenario. A cube created in SSAS 2008. I can connected
I have the following scenario: User X logs in to the application from location
I have following Scenario: PHP(Server, Writer) ----> MySQL Database <------ PHP(Client, Reader/ Writer); PHPS
Following scenario: In an WPF application the program calls Log.Write to enqueue messages which
Consider the following scenario: Page written in classic ASP or PHP, which is rendering
I've got the following scenario: An application is built via the IDE and via
Given the following scenario Start off with this structure: Trunk\blah\ Tag\ I branch Trunk
I have following scenario: The Android clients communicate with a PHP server via HTTP
Imagine following scenario: We have a lot of parallel development going on in several
Consider following scenario: I have RESTful URL /articles that returns list of articles user

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.