I need to connect the form to a database that I already have, but it is not connecting and I can't seem to find the problem. I the error that is showing up mostly is the "mysqli" error but I can't find the reason behind it
--order.php--
<!DOCTYPE html>
<html>
    <head>
        <title>Checkout</title>
        <link rel = "stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
        <link rel="stylesheet" href="styles.css"/>
    </head>
    <body>
        <div class="col-sm-5 clearfix">
            <div class="bill-to">
                <h2>Bill To</h2>
                    <div class="form-one">
                    <form action="order.php" method="POST">
                    <input type="text" id="FirstName" name="FirstName" placeholder="First Name" style="width:350px; background-color:pink;"><br>
                    <input type="text" id="Surname" name="Surname" placeholder="Last Name" style="width:350px;background-color:pink;"><br>
                    <input type="text" id="HouseName" name="HouseName" placeholder="House Name" style="width:350px;background-color:pink;"><br>
                    <input type="text" id="StreetName" name="StreetName" placeholder="Street Name" style="width:350px;background-color:pink;"><br>
                    <input type="text" id="Locality" name="Locality" placeholder="Locality" style="width:350px;background-color:pink;"><br>
                    <input type="text" id="MobileNumber" name="MobileNumber" placeholder="Mobile Number" style="width:350px;background-color:pink;"><br>
                    <input type="text" id="Email" name="Email" placeholder="Email Address" style="width:350px;background-color:pink;">
                    <input type="submit" name="submit" value="Register"/>
                    </form> 
                    <?php
                        if(isset($_POST['submit']))
                        {
                        $FirstName=$_POST['FirstName']; 
                        $Surname=$_POST['Surname'];
                        $result="INSERT INTO users (FirstName,Surname) VALUES ('$FirstName','$Surname')";
                         mysqli_query($conn,$result);
                        }
                    ?>
                   </div>
            </div>
        </div>
    </body>
</html>
--connect.php-- This is the code that is in connect.php
<?php
    $user = 'root';
    $pass ='';
    $host = 'localhost';
    $db = 'webassignment';
    $conn = new mysqli($host, $user, $pass, $db);
  if ($conn -> connect_error) {
    die("Connection failed: " . $conn->connect_error);
  }
?>
 
     
    