You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
<?php
|
|
require_once('./Config/Config.php');
|
|
require_once('./Config/Autoload.php');
|
|
Autoload::charger();
|
|
|
|
echo "test1\n";
|
|
try {
|
|
$con = new Connection($dsn);
|
|
|
|
$query = "INSERT INTO Utilisateur VALUES (:email,:pseudo,:mdp,:estAdmin)";
|
|
$con->executeQuery($query, array(
|
|
':email' => array("SUPERsuper", SQLITE3_TEXT),
|
|
':pseudo' => array("dragon", SQLITE3_TEXT),
|
|
':mdp' => array("qsdfgyutfcvbghytrfcvgbtfcvgh", SQLITE3_TEXT),
|
|
':estAdmin' => array(0, SQLITE3_INTEGER)
|
|
));
|
|
|
|
$query = "SELECT * FROM Utilisateur";
|
|
$con->executeQuery($query);
|
|
$results = $con->getResults();
|
|
foreach ($results as $row) {
|
|
echo $row['email'] . '</br>';
|
|
echo $row['pseudo'] . '</br>';
|
|
echo $row['mdp'] . '</br>';
|
|
echo $row['estAdmin'] . '</br>';
|
|
}
|
|
}
|
|
catch (PDOException $e) {
|
|
echo $e->getMessage();
|
|
}
|
|
catch (Exception $e2) {
|
|
echo $e2->getMessage();
|
|
}
|
|
$control = new FrontController();
|
|
echo "test2\n";
|
|
|
|
//session_regenerate_id(true);
|
|
// session_unset();
|
|
// session_destroy();
|
|
// $_SESSION = null;
|
|
|
|
//https://a-pellegrini.developpez.com/temp/tutoriels/php/security/session/#III.2
|