使用medoo框架将数据从表单插入数据库

My works, but the data was saved as null. I want to send my data from a form to a table. How can I achieve it?

<?php

if (isset($_POST['send-data'])) { 
    $firstName = $_POST['first_name'];
    $lastName = $_POST['last_name'];
    $idNumber = $_POST['id_number'];
    $password = $_POST['password'];
    $phone = $_POST['phone'];
    $age = $_POST['age'];
    $email = $_POST['email'];

    $database->insert("test", array( "firstName" => "$firstName", 
    "lastName" => "$lastName", "idNumber" => "$idNumber", "password" => "$password", 
    "phone" => "$phone", "age" => "$age", "email" => "$email" ));
    }

?>

I think you can strip away the double quotes around each variable:

if (isset($_POST['send-data'])){ 
    $firstName = $_POST['first_name']; 
    $lastName = $_POST['last_name']; 
    $idNumber = $_POST['id_number']; 
    $password = $_POST['password']; 
    $phone = $_POST['phone']; 
    $age = $_POST['age']; 
    $email = $_POST['email'];

    $database->insert("test", array( 
        "firstName" => $firstName,
        "lastName" => $lastName, 
        "idNumber" => $idNumber, 
        "password" => $password, 
        "phone" => $phone, 
        "age" => $age, 
        "email" => $email 
    )); 
} ?>

if this doesn't work you should try with chaining: "'.$email.'" for each field