first commit

This commit is contained in:
alazhar
2020-01-02 23:07:40 +07:00
commit 06d138977d
387 changed files with 83476 additions and 0 deletions

View File

@ -0,0 +1,24 @@
<?php
class User_model extends CI_Model{
function simpan_user()
{
$simpan_data=array(
'nama_lengkap' => $this->input->post('nama_lengkap'),
'username' => $this->input->post('username'),
'password' => md5($this->input->post('password')),
'email' => $this->input->post('email'),
'alamat' => $this->input->post('alamat')
);
$simpan = $this->db->insert('user', $simpan_data);
return $simpan;
}
function login($user,$pass)
{
$pass = md5($pass);
$sql1 = "SELECT * FROM USER WHERE username = '$user' AND password = '$pass'";
$rs = mysql_query($sql1);
$r = mysql_num_rows($rs);
if ($r=='1'){return true;}
}
}