I have created a login page using CodeIgniter 1.7. its code is shown below:
<?php
class login extends Controller {
function login()
{
parent::Controller();
}
function index()
{
$this->load->view('loginview');
}
function verify()
{
if ($this->input->post('username')){
$uname = $this->input->post('username');
$upass = $this->input->post('password');
$result=$this->dblogin->verifyUser($uname,$upass);
if($result){
redirect('dashboards','refresh');
}}
}
}
/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */
there is an external model for selecting users from database. if you enter correct details, it displays a blank page but if you enter invalid credentials, it will display the error message. can somebody put it better to redirect to dashboards controller.