I have a text input field that has a type=number.When i post it from the form containing this element to the saveform.php it recieves the numbers in the form of string.So when i use the update query in saveform.php to update the db with this value , mysql gets updated with the intval of this string.In mysql i have a column by the name mobile_no which is of the type int and of length 15.
saveform.php
$query="UPDATE `registered_users` SET `user_name`=?,`mobile_no`=?,`addressline1`=?,`addressline2`=?,`city`=?,`zipcode`=? WHERE `user_email`=?";
$statement = $mysqli->prepare($query);
$statement->bind_param("sisssis", $username, $mobileno, $addressline1, $addressline2, $city, $zipcode, $email);
This is the code of the query that i have made.I have made a var_dump of the $mobile_no and the output of this dump is given below.
string '9560987629' (length=10)
This gets updated in the db with this
int 2147483647 .How am i supposed to update the right values without changing my mysql column from int to string.