Question: I am trying to store a phone number in mysql database. But it stores a different value.

```
<form align="center" method="post" action="sendingdata.php" enctype="multipart/form-data">

<label for="phone">Phone Number </label></br>
            <input type="number" name="phone" id="phone" placeholder="90000 12345"/>

            <input class="submit" type="submit" />

```

The following is the sendingdata.php

```
$phone = $_POST['phone'];
$q = sprintf("insert into posts(title,price,description,imagepath,name,phone) values('%s',%d,'%s','%s','%s','%d')", mysqli_real_escape_string($conn, $title), mysqli_real_escape_string($conn, $price), mysqli_real_escape_string($conn, $description), mysqli_real_escape_string($conn, $imageName),mysqli_real_escape_string($conn, $username),mysqli_real_escape_string($conn, $phone));

if (mysqli_query($conn, $q)) {
    header('Location: index.php');
    echo "success";
} 

```

The value I tried to input is 90000 00000. But the value stored in database is 2147483647

ps: The data type in mysql is BIG INT

Answer: 
Try to set your data type to VARCHAR (or CHARACTER (n)) instead of BIG INT. Phone number is basically an information, no need to calculate with it, so it is better when you store in string type data.
I think your datatype of your phone field is int so it is not able to store 90000 00000 try by changing it to bigint.