i have a simple login form and validating it
localhot/edf/auth/user
if validation === false load login page again with error and renter the proper data and resubmit the form but controller name appear double.like
localhost/edf/auth/auth/user
get 404 eror.
public function index()
{
$Data['banks'] = $this->AuthModel->Banks()->result();
$Data['view'] = "Auth";
$this->load->view('dashboard',$Data);
}
public function User(){
$this->form_validation->set_rules('bank', 'Bank', 'required|numeric',);
$this->form_validation->set_rules('branchcode', 'Branch Code', 'required|numeric');
$this->form_validation->set_rules('User', 'Email', 'required');
$this->form_validation->set_rules('auth', 'Password', 'required');
if ($this->form_validation->run() == FALSE)
{
$Data['banks'] = $this->AuthModel->Banks()->result();
$Data['view'] = "Auth";
$this->load->view('dashboard',$Data);
}
else
{
$Data['view'] = "";
$this->load->view('dashboard',$Data);
}
}