title: Delete an account record using id in codeigniter
body: <p>Help me about deleting an account record as one of the admin in the system.
  it's like I'm managing an accounts. </p>
  
  <hr>
  
  <p>For example. </p>
  
  <pre><code>User-1 [Update] [Delete]
  User-2 [Update] [Delete]
  User-3 [Update] [Delete]
  User-4 [Update] [Delete]
  </code></pre>
  
  <hr>
  
  <p>and I want to delete User-3.</p>
  
  <hr>
  
  <h2>Controller (login)</h2>
  
  <pre><code>public function delete($id = '') {
  $this-&gt;load-&gt;model('User_model');
  $this-&gt;User_model-&gt;delete_id($id);
  </code></pre>
  
  <hr>
  
  <h2>Model (User_model)</h2>
  
  <pre><code>public function delete_id ($id) {
  $this-&gt;db-&gt;where('id', $id);
  $this-&gt;db-&gt;delete('user'); 
  redirect('users', 'refresh');
  }
  </code></pre>
  
  <p><strong>db table name = user</strong></p>
  
  <p>Help me please I'm still noob in codeigniter.</p>