The problem is in insertRecord.php but i am unable to find it.i have also attached the image of error
The problem is in insertRecord.php but i am unable to find it.i have also attached the image of error
Undefined variable: firstname,lastname,password,email,age,gender is the problem  
 
insertRecord.php
<?php
    include 'connection.php';
    if(isset($_POST['submit']))
    {
        echo"sucee";
    $firstname = $_POST['firstname'];
    $lastname = $_POST['lastname'];
    $email = $_POST['email'];
    $password = $_POST['password'];
    $gender = $_POST['gender'];
    $age = $_POST['age'];
    }
    $sql = "INSERT INTO user (FirstName,LastName,Email,Password,Gender,Age) VALUES ('$firstname', '$lastname', '$email', '$password', '$gender', '$age')";
    $result=mysqli_query($connection, $sql);
    include 'watWK6.php';
    include 'selectRecord.php';
    ?>
connection
<?php 
$hostname = 'localhost'; 
$username = 'root'; 
$password = ''; 
$databaseName = 'c7181378'; 
$connection = mysqli_connect($hostname, $username, $password, $databaseName) or exit("Unable to connect to database!");
?>
watWK6.php
<!DOCTYPE html>
<html lang="en">
   <head>
      <title>Web Applications and Technologies</title>
      <link type="text/css" rel="stylesheet" href="main.css" />
   </head>
   <body>
      <header>
         <h1> C7181378</h1> 
      </header>
      <section id="container">
         <form method = "POST" action = "insertRecord.php">
            <fieldset>
                <legend> Enter Customer Details </legend>
                <label> First Name: </label>
                <input type = "text" name = "firstname"/>
                <br/>
                <label> Surname: </label>
                <input type = "text" name = "lastname"/>
                <br/>
                <label> Email: </label>
                <input type = "text" name = "email"/>
                <br/>
                <label> Password: </label>
                <input type = "password" name = "password"/>
                <br/>
                <label> Gender: </label>
                <select name = "gender">
                    <option value = "M"> Male </option>
                    <option value = "F"> Female </option>
                </select>
                <br/>
                <label> Age: </label>
                <input type = "text" name = "age"/>
                <br/>
                <input type = "submit" value = "submit" name = "submit"/>
            </fieldset>
         </form>
      </section>
      <footer>   
         <small> <a href="../index.html">Home</a></small>
      </footer>
   </body>
</html>
<?php
    include 'selectRecord.php';
?>
 
     
    