1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
| <?php
//Vérification de l'existence de la variable ;
if((isset($_POST['email'])) && (!(empty($_POST['email']))))
{
$mail = htmlspecialchars($_POST['email'], ENT_QUOTES);
//On compte le nombre d'entrée(s) dans la table où le champ "mail" vaut $mail
$nombremail = mysql_result(mysql_query("SELECT COUNT(*) FROM identifiant WHERE mail_contact = '".$mail."'"), 0);
if ($nombremail!= 0)
{
}
else
{
?>
<div id="pays">Attention : Cette adresse e-mail n\'existe pas !</div>
<br />
<br />
<form method="post" enctype="multipart/form-data" action="oubli_mdp.php">
<table class="tableau_formulaire" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td class="tableau_formulaire_titre_saisie">Votre mail :</td>
<td class="tableau_formulaire_saisie"><input type="text" name="email" size="40" value="" maxlength="70"></td>
</tr>
<tr>
<td height="28" class="tableau_formulaire_titre_saisie"> </td>
<td valign="bottom" class="tableau_formulaire_saisie"><input type="submit" name="upload" value="Réessayer"></td>
</tr>
</table>
</form>
<br />
<?php
}
}
else
{
?>
<?php
echo '<div id="pays">';
echo 'Nous venons de vous renvoyer votre mot de passe à '.$mail.'';
echo '</div">';}
?> |
Partager