Welcome Guest, Not a member yet? Register   Sign In
fatal error:Call to a member function query()
#3

[eluser]praveenarya[/eluser]
ya thanks for fast reply i got it i auto loaded it instead manually but
when loading error message it behaving stange
mycode is
Code:
if($_SERVER['REQUEST_METHOD']=="POST")
    {
        $ssss="select * from ab_admin where ad_uname='".$_POST['log_id']."' and ad_pass='".$_POST['log_pswd']."' and ad_status=1";
    $query=$this->db->query($ssss);
    //$query = $this->db->query("select * from `ab_admin` where ad_uname='".$_POST['log_id']."' and ad_pass='".$_POST['log_pswd']."' and ad_status=1");

if ($query->num_rows() > 0)
{

foreach ($query->result_array() as $row)
{
//if sucess then
$this->load->view('admin/welcome');
} }else {
$data['msg']="InValid Login Details";
    
    $this->load->view('admin/welcome_message',$data);
}

}

i got two pages one normal one and one with error message set

what i did wrong please correct me
thanks in advance


Messages In This Thread
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 06:30 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 06:33 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 06:43 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 06:53 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 06:55 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 10:43 AM
fatal error:Call to a member function query() - by El Forum - 08-28-2009, 09:42 PM
fatal error:Call to a member function query() - by El Forum - 08-31-2009, 08:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB