title: Error: data truncated for column 1
body: <p>So far all the results I'm finding for this error are in reference to some additional code (phpmyadmin or python) so I'm a little confused. Had issues with my form yesterday but that appears to be resolved. So, now I appear to be having an issue with the drop down lists I've created. They function fine in regards to actually displaying a list from a MySQL query but they don't appear to be selecting the correct value.</p>
  
  <p>Here's the Form:</p>
  
  <pre><code>&lt;form action="/php/newcarcodetest.php" method="post"&gt;
     &lt;table style="width:575px"&gt;
        &lt;tr&gt;
           &lt;th&gt;Make&lt;/th&gt;
           &lt;td&gt;&lt;select name="make" style="width:344px"&gt;&lt;?php make() ?&gt;&lt;/select&gt;&lt;/td&gt;
           &lt;td&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
           &lt;th&gt;Model&lt;/th&gt;
           &lt;td&gt;&lt;select name="model" style="width:344px"&gt;&lt;?php model() ?&gt;&lt;/select&gt;&lt;/td&gt;
           &lt;td&gt;&lt;/td&gt;
        &lt;/tr&gt;
     &lt;/table&gt;
     &lt;br&gt;
     &lt;input type="submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here's the function:</p>
  
  <pre><code>function make() {
      $qmake=mysql_query("SELECT VMakeID, VMake FROM vmake");
      while($record=mysql_fetch_array($qmake)) {
          echo '&lt;option value="'.$record['VMakeID'].'"&gt;'.$record['VMake'].'&lt;/option&gt;';
      }
  }
  
  function model() {
      $qmodel=mysql_query("SELECT VModelID, VModel FROM vmodel");
      while($record=mysql_fetch_array($qmodel)) {
          echo '&lt;option value="'.$record['VModelID'].'"&gt;'.$record['VModel'].'&lt;/option&gt;';
      }
  }
  </code></pre>
  
  <p>And then here's the php for the form:</p>
  
  <pre><code>&lt;?php
  $con=mysqli_connect("server","mycaradmin","SuperSecretPassword","mycars");
  if(mysqli_connect_errno()) {
      echo "Failed to connect to MySQL: ".mysqli_connect_error();
  }
  $make=$_POST["make"];
  $model=$_POST["model"];
  $sql="INSERT INTO mycars.vehicles (VMakeID,VModelID)
        VALUES ('$make','$model;')";
  if(!mysqli_query($con,$sql)) {
      die('Error: '.mysqli_error($con));
  }
  echo "1 record added";
  mysqli_close($con);
  ?&gt;
  </code></pre>
  
  <p>Like I said, the functionality of the dropdown is working fine. And I know I need to work on reducing the possibility of SQL injections but I'm just trying to get it working at this point. When I click the submit button it takes me to a blank page with the error:</p>
  
  <p>Error: Data truncated for column 'VModelID' at row 1</p>
  
  <p>Thanks in advance!!</p>