title: Updating Database phpmyadmin with codeigniter4 or codeigniter3
body: <p>Im sorry im new in CI4 or CI3,</p>
  
  <p>I want to update my database with a form. But it can not update where i want to, even i put code where in it, if i delete the where code, they will update all of my record in my database, please ive been reading the documentation of CI4 and i still cant understand why my code can not detect the where code.</p>
  
  <p>here's my full controllers code </p>
  
  <pre><code>&lt;?php
  defined('BASEPATH') or exit('No direct script access allowed');
  
  class User extends CI_Controller
  {
      public function __construct()
      {
          parent::__construct();
          $this-&gt;load-&gt;library('form_validation');
      }
  
      public function index()
      {
  
          $data['title'] = 'My Profile';
          $data['user'] = $this-&gt;db-&gt;get_where(
              'user',
              ['email' =&gt; $this-&gt;session-&gt;userdata('email')]
          )-&gt;row_array();
  
          $this-&gt;load-&gt;view('templates/header', $data);
          $this-&gt;load-&gt;view('templates/sidebar');
          $this-&gt;load-&gt;view('templates/topbar');
          $this-&gt;load-&gt;view('user/index');
          $this-&gt;load-&gt;view('templates/footer');
      }
  
      public function edit()
      {
          $data['title'] = 'Edit Profile';
          $data['user'] = $this-&gt;db-&gt;get_where(
              'user',
              ['email' =&gt; $this-&gt;session-&gt;userdata('email')]
          )-&gt;row_array();
  
          $this-&gt;form_validation-&gt;set_rules('name', 'Full Name', 'required|trim');
  
  
          if ($this-&gt;form_validation-&gt;run() ==  false) {
              $this-&gt;load-&gt;view('templates/header', $data);
              $this-&gt;load-&gt;view('templates/sidebar');
              $this-&gt;load-&gt;view('templates/topbar');
              $this-&gt;load-&gt;view('user/edit');
              $this-&gt;load-&gt;view('templates/footer');
          } else {
              //update data name / bio
              $name = $this-&gt;input-&gt;post('name');
              $email = $this-&gt;input-&gt;post('email');
              $bio = $this-&gt;input-&gt;post('bio');
              $data = array(
                  "name" =&gt; $name,
                  "bio"  =&gt; $bio,
              );
              $this-&gt;db-&gt;where('email', $email);
              $this-&gt;db-&gt;update('user', $data);
  
              $this-&gt;session-&gt;set_flashdata('message', '&lt;div class="alert alert-success" style="text-align:center;" role="alert"&gt;
      Your profile has been updated!&lt;/div&gt;');
              redirect('user/edit');
          }
  
      }
  }
  </code></pre>
  
  <p>And i dont use any models :/</p>