bonjour,
je fait un formulaire sur ma page d'inscription. et je voudrais tester le mot de passe et le mail grâce à des champs "confirmation mot de passe et mail".
J'ai fait un if pour faire ce test mais il me met "Notice: Undefined variable: pass2", "Notice: Undefined variable: pass", "Notice: Undefined variable: mail2" et "Notice: Undefined variable: mail"
voici le code
[CODE]
<?php
if (isset($_post['nom'])) {
$nom = $_post['nom'];
$prenom = $_post['prenom'];
$pseudo = $_post['pseudo'];
$pass = $_post['pass'];
$pass2 = $_post['pass2'];
$mail = $_post['mail'];
$mail2 = $_post['mail2'];
}
if ($pass != $pass2 OR $mail != $mail2){
echo 'Les "<strong>mots de passe </strong>" ou "<strong>mails</strong>" ne sont pas identiques';
}
?>
<h1> Inscription </h1> <br/>
<div id="central">
<form method="POST" action="inscription.php">
<table>
<tr>
<td><label for="nom"> <span class="idform"> Nom: </span> </label></td> <td><input type="text" name="nom" id="nom"></td>
</tr>
<tr>
<td><label for="prenom"> <span class="idform"> Prenom: </span> </label></td> <td><input type="text" name="prenom" id="prenom"></td>
</tr>
<tr>
<td><label for="pseudo"> <span class="idform"> Pseudo*: </span></label></td> <td><input type="text" name="pseudo" id="pseudo"></td>
</tr>
<tr>
<td><label for="pass"> <span class="idform"> Mot de passe*: </span></label></td> <td><input type="password" name="pass" id="pass"/></td>
</tr>
<tr>
<td><label for="pass2"> <span class="idform"> Confirmation mot de passe*: </span></label></td> <td><input type="password" name="pass2" id="pass2"/></td>
</tr>
<tr>
<td><label for="mail"> <span class="idform"> Mail*: </span></label></td> <td><input type="text" name="mail" id="mail"></td>
</tr>
<tr>
merci d'avance
Partager