$host = 'localhost';
$user = 'root';
$password = '';
$database = 'students';
$connects = mysqli_connect($host, $user, $password, $database);
if (isset($_POST['btn'])) {
$surname = $_POST['surname'];
$result = $_POST['result'];
}
$ins = "INSERT INTO Student(result, surname) VALUES('$result', '$surname')";
$obj = mysqli_query($connects, $ins);
while ($row = mysqli_fetch_array($obj)) {
print_r($row);
}