first commit

This commit is contained in:
alazhar
2020-01-02 23:12:35 +07:00
commit 1b7f223f9d
362 changed files with 110045 additions and 0 deletions

View File

@ -0,0 +1,19 @@
<?php
class UserModel extends CI_Model{
function tambah($data)
{
return $this->db->insert('user',$data);
}
function tambah_profil($data)
{
if($this->db->insert('profil',$data)){
return $this->db->insert_id();
}else return 0;
}
function login($data)
{
$query = $this->db->get_where('users', array('username' => $data['username'],'pass'=>$data['password']), 1);
return $query->row();
}
}