This question already has an answer here:
Trying to get mobile no saved in the database with the following html5 validation and on every entry in db insted of the mobile no put 2147483647 gets saved.Please Help.Stuck
<label for="su_mobile">Mobile No</label>
</span>
<input type="tel" id="su_mobile" name="su_mobile" pattern="^[789]\d{9}$" title='Phone Number (Format:10 digits starting with 9/8/7 )' placeholder="No which you wanna get recharged" required></input><br/><br/>
$yo_mobile=@mysqli_real_escape_string($dbc, trim($_POST['su_mobile']));
<label for="fi_mob">Mobile No</label>
<br/>
<input type="text" id="fi_mob" name="fi_mob" value="<?php
$dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)
or die('Error communicating to MySQL server.');
$cool=$_SESSION['user_id'];
$a="SELECT * FROM userdata WHERE user_id='$cool'";
$name = mysqli_query($dbc,$a);
while($row = mysqli_fetch_array($name))
{
$queried_name = $row['mobile'];
echo $queried_name;
}
mysqli_close($dbc);
?>" readonly></input><br/>
</div>