From 50705e1234252ca5838fcb972c5e934d5066f1ae Mon Sep 17 00:00:00 2001 From: adri Date: Wed, 2 Jan 2019 11:48:16 +0100 Subject: [PATCH] add function user exist --- function.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 function.php diff --git a/function.php b/function.php new file mode 100644 index 0000000..97e1ad7 --- /dev/null +++ b/function.php @@ -0,0 +1,20 @@ +getMessage()); +} +//SELECT * FROM `projetphp` WHERE `login` = 'aaazzze' +function userExist($login){ + $req = $bdd->prepare('SELECT * FROM `projetphp` WHERE `login` = :login'); + $req->execute(array('login' => htmlspecialchars($_POST["userToDel"]))); + if($req->rowCount() != 0) + { + return true; + } + else { + return false; + } +} +?>