1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
PHP_TP3/models/m_hello.php

20 lines
465 B
PHP
Raw Permalink Normal View History

2020-10-16 08:16:09 +02:00
<?php
2020-10-16 09:28:41 +02:00
require_once("lib/getPDD.php");
$bdd = getPDO();
if ($bdd instanceof PDO) {
try {
$req = $bdd->prepare("SELECT * FROM Utilisateur WHERE nom = ?");
$req->execute(array($username));
if (!$user = $req->fetch())
$alert = choixAlert("login");
2020-10-16 09:55:16 +02:00
$req->closeCursor();
2020-10-16 09:28:41 +02:00
} catch (Exception $e) {
$alert = choixAlert("query");
}
} elseif ($bdd instanceof Exception)
$alert = choixAlert("connexion");