title: Not able to Inserting Correct Mobile number to phpMyAdmin using PHP
body: <p>If the mobile number 1234567890, the below code is working fine.</p>
  
  <p>If the mobile number is either 2134567890 or another other number not starting with 1, the below code is inserting this number "2147483647" and code is not giving correct output.</p>
  
  <p>Using POST method of FORM i'm getting the values and ACTION is $_SERVER['PHP_SELF']</p>
  
  <p>Using isset($_POST['submit']), written below the code.</p>
  
  <p>Here is the Code:</p>
  
  <pre><code>$sql=mysql_query("insert into registration (regname,regmobile) values ('$_POST[regname]','$_POST[regmobile]')");
  $sql1=mysql_query("select * from registration where regmobile='$_POST[regmobile]'");
  if(mysql_num_rows($sql1)&gt;0)
  {
      while($row=mysql_fetch_array($sql1))
      {
          $regname=$row['regname'];
          $regmobile=$row['regmobile'];
          $regid=$row['regid'];
          $reguserid=substr($regname,1,2).substr($regmobile,-4).substr($regid,-2);
          $sql2=mysql_query("update registration set reguserid='$reguserid' where regmobile='$regmobile'");
  
      }
  }
  </code></pre>
  
  <p>Thanks &amp; Regards</p>
  
  <p>Swetha</p>