Voici mon petit problème j'ai trouvez un script en php d'espace membre pour mon site je les modifier comme je pouvait pour l'inscription et la connexion mais le soucis je bloque sur se code:
Code : Tout sélectionner
<?php require('include.php'); ?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Identifiants oubliés</title>
<link href="style/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="content" >
<?php
if(isset($_POST['send'])){
$forget = $db->prepare("SELECT `pseudo`,`mdp` FROM `users` WHERE `mail` = :mail LIMIT 1");
$forget->execute(array(
"mail" => $_POST['mail']
));
$dnn = $forget->fetchObject();
$mdp = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5(key_encrypt), base64_decode($dnn->mdp), MCRYPT_MODE_CBC, md5(md5(key_encrypt))), '\0');
$message = "Identifiants :<br><br>
Pseudo : ".$dnn->pseudo."
<br>Mot de passe : ".$mdp;
$headers = "From: ".company_name."<".company_mail.">\n";
$headers .= "Reply-To: ".company_mail."\n";
$headers .= "Content-Type: text/html; charset=\"iso-8859-1\"";
mail($_POST['mail'],"Identifiants [".company_name."]",$message,$headers);
echo "<div class=\"succes\">vos identifiants ont été envoyés à votre adresse email</div>";
redirect("index.php", 5);
}
?>
<h2>Identifiants oublié ?</h2>
<form action="forget.php" method="post" dir="ltr" lang="fr">
<p><label>Adresse mail :
<input type="email" name="mail">
</label></p>
<p><input type="submit" name="send" value="Envoyer"></p>
</form>
</div>
</body>
</html>