<?php
class dblogin extends CI_model
{
function chklogin($user,$pass)
{
$sql=$this->db->query("select *from register where username='".$user."' and password='".$pass."' ");
return $sql->row();
}
function chkuser($user)
{
$sql=$this->db->query("select *from register where username='".$user."'");
return $sql->row();
}
function chkpass($user)
{
$sql=$this->db->query("select password from register where username='".$user."'");
return $sql->row();
}
}
?>
class dblogin extends CI_model
{
function chklogin($user,$pass)
{
$sql=$this->db->query("select *from register where username='".$user."' and password='".$pass."' ");
return $sql->row();
}
function chkuser($user)
{
$sql=$this->db->query("select *from register where username='".$user."'");
return $sql->row();
}
function chkpass($user)
{
$sql=$this->db->query("select password from register where username='".$user."'");
return $sql->row();
}
}
?>
No comments:
Post a Comment