I am new in codeigniter.
I was trying to develop login page and its almost done but i do not know when i am trying to redirect page after successful login or redirecting after not successful login, the starting part of url localhost:81
changes to [::1]
. I do not know why its happening i google it but i did not get proper way so please some one help me below i have mention my code.
Thank you in advance.
this is the controller code to verify Email and password
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class verifyLogin_controller extends CI_Controller {
function _construct(){
parent::_construct();
}
public function index()
{
if($_POST["submitLogin"])
{
$userEmail=$this->input->post('email');
$password=$this->input->post('password');
$verify_query = $this->db->from("admin");
$verify_query = $this->db->where(array("admin_userid" => $userEmail,"admin_password"=>$password));
$verify_query = $this->db->limit(1);
$res=$this->db->get()->result();
if($res != null)
{
redirect("homeHeader_controller/index");
}
else
{
redirect("adminLogin_controller/index");
}
}
}
}