Advertisement
jamboljack

Model Users

Sep 16th, 2017
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1. function insert_data() {
  2.     $data = array(             
  3.                     'user_username'     => trim($this->input->post('username', 'true')),
  4.                     'user_password'     => sha1(trim($this->input->post('password', 'true'))),
  5.                     'user_nip'          => trim($this->input->post('nip', 'true')),
  6.                     'user_nama'         => ucwords(strtolower($this->input->post('nama', 'true'))),                
  7.                     'user_email'        => trim($this->input->post('email', 'true')),
  8.                     'user_jabatan'      => trim($this->input->post('jabatan', 'true')),
  9.                     'user_level'        => 'Admin',
  10.                     'user_active'       => 'Active',
  11.                     'user_update'       => date('Y-m-d H:i:s')
  12.                 );
  13.        
  14.         $this->db->insert('rtlh_users', $data);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement