SQL
This commit is contained in:
@@ -12,17 +12,26 @@
|
||||
|
||||
if($mail)
|
||||
{
|
||||
$pass = filter_input(INPUT_POST, 'passwd', FILTER_SANITIZE_STRING);
|
||||
$promo = filter_input(INPUT_POST, 'promo', FILTER_VALIDATE_INT | FILTER_SANITIZE_NUMBER_INT);
|
||||
|
||||
// A continuer
|
||||
if($promo)
|
||||
{
|
||||
$pass = filter_input(INPUT_POST, 'passwd', FILTER_SANITIZE_STRING);
|
||||
|
||||
register($mail, $promo, password_hash($pass, PASSWORD_DEFAULT));
|
||||
|
||||
header("Location: login.php");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include "../templates/header.php";
|
||||
?>
|
||||
<form method="POST">
|
||||
<label for="mail">mail</label>
|
||||
<input type="email" id="mail" name="mail" placeholder="Votre identifiant" required value="<?php if(isset($error)) echo $_POST['mail'] ?>"/>
|
||||
<label for="mail">Mail</label>
|
||||
<input type="email" id="mail" name="mail" placeholder="Votre adresse mail" required value="<?php if(isset($error)) echo $_POST['mail'] ?>"/>
|
||||
<label for="promo">Promo</label>
|
||||
<input type="number" id="promo" name="promo" placeholder="Votre année de sortie du BUT" required min="1996" max="<?php $now = date("Y") + 3; echo $now; ?>" />
|
||||
<label for="passwd">Mot de passe</label>
|
||||
<input type="passwd" id="passwd" name="passwd" placeholder="Votre mot de passe" minlength="6" required value="<?php if(isset($error)) echo $_POST['passwd'] ?>" />
|
||||
<label for="conf_passwd">Confirmer votre mot de passe</label>
|
||||
|
Reference in New Issue
Block a user