<?php

//include('includes/config.php');

$servername = "localhost";
$username = "root";
$password = "";
$dbname = "membershiphp";

$conn = new mysqli($servername, $username, $password, $dbname);

if ($conn->connect_error) 
{
    die("Connection failed: " . $conn->connect_error . ".<br> Please create a database and import the SQL file");
}


$nom = "Delpy";
$prenom = "Patrice";
$email = "patrice.delpy";
$user_id = "555";
$statut = "actif";
$privilege = "Super";


$insertQuery = "INSERT INTO members_data (id, nom, prenom, email, ,user_id, statut, privilege , created_at, expiration) 
    VALUES ( NULL, '$nom', '$prenom', '$email', '$user_id', '$statut', '$privilege', NOW() , 'toto' )";

/*
INSERT INTO `members_data` (`id`, `nom`, `prenom`, `email`, `user_id`, `statut`, `privilege`, `created_at`, `expiration`) 
VALUES (NULL, 'Delpy', 'Patrice', 'patrice.delpy@outlook.fr', '555', 'actif', 'super', CURRENT_TIMESTAMP, 'aqw');
echo $insertQuery;
*/
echo "<br>";

//echo $conn;

echo "fgfggdfg";
if ($conn->query($insertQuery) === TRUE) 
{
    echo "Yes";
}
?>