Please help me..I've the following code and I entered an account number in bank account number field but in database was changing the value. what's wrong?
My input in bank account number field is :112046067391
but the output is :2147483647
In database I set it to int(20) but still the same.
<form name="addpayment" method="post" action="addpaymentmethod.php">
<table width="700px">
<tr>
<td valign="top">
<label for="shoptitle">Bank Name *</label>
</td>
<td valign="top">
<input type="text" name="bankname" maxlength="50" size="30" />
</td>
</tr>
<tr>
<td valign="top">
<label for="prefix">Bank Account Number </label>
</td>
<td valign="top">
<input type="text" name="acc" size="30" />
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center">
<input type="submit" value="Add Now">
</td>
</tr>
</table>
</form>
</div>
<?php
if(isset($_POST['bankname'])){
if(isset($_POST['acc'])){
mysql_query("INSERT INTO paymentmethod (PaymentName,AccountNumber) VALUES('$_POST[bankname]','$_POST[acc]')") or die (mysql_error());
}else{echo'Please enter your bank account number';}
}else{echo'Please enter your bank name';}
?>