Logica y conexion con la base de datos hecha

This commit is contained in:
2021-05-20 22:08:31 -03:00
parent 9b934b2c95
commit 9b8a533548
7 changed files with 75 additions and 2 deletions

View File

@@ -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!');