title: How to insert enum data on Mysql from Php?
body: <p>I have created an Enum on mylsql like this enum('male', 'female') but when I wanna insert data, I have some errors on just enum column. I shared my codes and error message. By the way I am using this class 
  <a href="https://github.com/tommyknocker/pdo-database-class" rel="nofollow noreferrer">https://github.com/tommyknocker/pdo-database-class</a></p>
  
  <pre><code>This is error message.
      D:\wamp64\www\newchat\register_control.php:30:
      array (size=3)
        0 =&gt; string '01000' (length=5)
        1 =&gt; int 1265
        2 =&gt; string 'Data truncated for column 'gender' at row 1' (length=43)
      male
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;div class="input-group form-group"&gt;
                          &lt;label class="radio"&gt;Male
                            &lt;input type="radio" checked="checked" name="gender" value="male" /&gt;
                            &lt;span class="radiocheckmark"&gt;&lt;/span&gt;
                          &lt;/label&gt;
                          &lt;label class="radio"&gt;Female
                            &lt;input type="radio" name="gender" value="female" /&gt;
                            &lt;span class="radiocheckmark"&gt;&lt;/span&gt;
                          &lt;/label&gt;
                      &lt;/div&gt;
  </code></pre>
  
  <p>PHP </p>
  
  <pre><code>// Get data from FROM
      $name       =$_POST["name"];
      $surname    =$_POST["surname"];
      $email      =$_POST["email"];
      $username   =$_POST["username"];
      $password   =$_POST["password"];
      $password2  =$_POST["password2"];
      $gender     =$_POST["gender"];
  
      // Insert data in db
      $data = [
          'name' =&gt; 'name',
          'surname' =&gt; 'surname',
          'email' =&gt; 'email',
          'username' =&gt; 'username',
          'gender' =&gt; 'gender',
          'password' =&gt; 'password'
      ];
  
      $id = $db-&gt;insert('users', $data);
      if ($id) {
          echo 'user was created. Id=' . $id;
          echo $gender;
      } else {
  
          var_dump($db-&gt;getLastError());
          echo $gender;
  
      }
  </code></pre>