mirror of
https://github.com/FranP-code/Login-Form.git
synced 2025-10-12 23:52:47 +00:00
Logica y conexion con la base de datos hecha
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
require 'messages.php';
|
||||
require 'sanitize.php';
|
||||
require './sql/querys.php';
|
||||
|
||||
$user = $_POST['user'];
|
||||
$password = $_POST['password'];
|
||||
@@ -17,7 +18,11 @@ if (isset($_POST['submit'])) {
|
||||
|
||||
if (strlen($password) <= 20) {
|
||||
|
||||
sanitize('user', $user);
|
||||
addToDB(sanitize('user', $user), $password);
|
||||
|
||||
echo '<script>
|
||||
window.location.replace(`../success-pages/registerS.html`)
|
||||
</script>';
|
||||
|
||||
} else {
|
||||
echo error('The password has more characters than allowed!');
|
||||
|
||||
Reference in New Issue
Block a user