title: Value not being entered into the MySQL database correctly
body: <p>The value for a field (phone number) isn't being correctly entered into the database. That is, the value seems to change once it's entered.</p>
  
  <p>The phone number has a max limit of 11 characters. In the HTML form, I set the 4 initial defaults characters to 1876 - Jamaica's area code.</p>
  
  <pre><code>&lt;tr&gt;
                  &lt;td&gt;Phone:&lt;/td&gt;
                  &lt;td&gt;&lt;input type="text" name="phone" maxlength="11" value="1876" onkeypress="return isNumberKey(event)"/&gt;&lt;/td&gt;
                &lt;/tr&gt;
  </code></pre>
  
  <p>Then, on the php side:</p>
  
  <pre><code>$phone = $_POST['phone'];
  </code></pre>
  
  <p>All other values in the field are being entered correctly.</p>
  
  <p>Where did I go wrong?</p>
  
  <p>UPDATE:</p>
  
  <p>In the MySQL table, the column data type is an int.</p>
  
  <p>It's inserted using this query:</p>
  
  <pre><code>$query = "INSERT INTO users (id, first_name, last_name, date_of_birth, email, phone) 
        VALUES ('$id','$first_name','$last_name','$encrypted_dob','$email','$phone')";
  </code></pre>
  
  <p>For example, I tried entering, say, 3025009 and it's storing some random value like 2147483647.</p>