Tidy a bit the files structure.
[Project_webapp.git] / includes / formlogin.php
diff --git a/includes/formlogin.php b/includes/formlogin.php
new file mode 100644 (file)
index 0000000..8da2e2c
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+$form_email = filter_input(INPUT_POST, "email", FILTER_VALIDATE_EMAIL);
+$form_password = filter_input(INPUT_POST, "password", FILTER_SANITIZE_STRING);
+
+if (!$form_email) {
+    echo "The email is not valid <br>";
+} else {
+    $sql_pquery = "select count(NumCI) from CLIENTS where EmailCI = ?";
+
+    echo "This email do not belong to a registred client, please register first <br>";
+
+    if (password_verify($form_password, $stored_password)) {
+
+    }
+}
+?>