<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="addnewmember.css">
</head>
<body>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {

  require 'database.php';
  // code...
  $sql = "INSERT INTO person_per (FirstName, LastName, per_Address1, per_City, per_Zip, per_Email, per_CellPhone, per_State)
            VALUES ('" . mysqli_escape_string($conn, $_POST['FirstName']) . "', '"
                        . mysqli_escape_string($conn, $_POST['LastName']) . "','"
                        . mysqli_escape_string($conn, $_POST['per_City']) . "','"
                        . mysqli_escape_string($conn, $_POST['per_Zip']) . "','"
                        . mysqli_escape_string($conn, $_POST['per_Email']) . "','"
                        . mysqli_escape_string($conn, $_POST['per_State']) . "','"
                        . mysqli_escape_string($conn, $_POST['per_CellPhone']) . "','"
                        . mysqli_escape_string($conn, $_POST['per_Address1']) . "')";

  $results = mysqli_query($conn, $sql);

  if ($results === false) {
    echo mysqli_error($conn);
  } else {

    $id = mysqli_insert_id($conn);
    echo "Member has been approved with this $id";
  }

}

 ?>
 <div class="newmemberdiv">
  <h2>Add New Member</h2>

 
<div class="newmember"><form action="approvemembership.php" method="post">
                <div><label for="">First Name:</label>
                 <input type="text" name="FirstName" id="FirstName" required="true"></div>
              <div> <label for="">Last Name: </label>
                <input type="text" name="LastName" id="LastName" required="true"> </div>
               <div><label for="">Birth Month:</label>
                 <input type="number"> </div> 
                 <div><label for="">Birth Day:</label>  <input type="number"> </div>
               <div> <label for="">Birth Year:</label>   
                <input type="number"></div> 
                <label for="">Phone Number:</label>
                 <input type="text" name="per_CellPhone" id="per_CellPhone"required="true" ></div>
                <div><label for="">Email:</label> 
                <input type="text" name="per_Email" id="per_Email" ></div>
                <div><label for="">Address :</label> 
                <input type="text" name="per_Address1" id="per_Address1" ></div>
                <div><label for="">City: </label>
                <input type="text" name="per_City" id="per_City"></div>
                <div><label for="">State: </label>
                <input type="text" name="per_State" id="per_State"></div>
                <div><label for="">ZipCode: </label>
                <input type="text" name="per_Zip" id="per_Zip"></div>
                <div><label for="">Country: </label>
                <input type="text" name="per_Country" id="per_Country"></div>

               <input type="submit" name="" id="">

              </form>
     </div>       
    </div>
</body>
</html>