<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    include('config.php'); // Your database connection

    $registerPhone = mysqli_real_escape_string($db, $_POST['phone']);
    $sql_query = "INSERT INTO tbl_users (mobile) VALUES ('$registerPhone')";

    if (mysqli_query($db, $sql_query)) {
        echo 'Success';
    } else {
        echo 'Error: ' . mysqli_error($db);
    }

    mysqli_close($db);
}
?>