Skip to Content
PHPCODE
CodeIgniter Creating Login Model
codeigniter code / July 29, 2018

Creating Login Model in Codeigniter

Step 1: go to application and model folder and created file.it file name login_valid.php
Step 2: For Example
<?php
class Loginmodel extends CI_Model
{
public function login_valid($username,$password)
{
return TRUE;
}
}
?>

Step 3: Controller loade model for example
$this->load->model(‘loginmodel’);
and function call
if($this->loginmodel->login_valid($username,$password))
{
}

PHPCODE © 2024