- Joined
- Feb 4, 2011
- Messages
- 96
- Reaction score
- 1
Good night.
I have the following code for the forgot password, i'm using MD5 Encryption for the passwords, if i send the password for the e-mail, the password will be MD5, is there anyway to have the original password without being encrypted?
Ill wait a answer.
Wertex
I have the following code for the forgot password, i'm using MD5 Encryption for the passwords, if i send the password for the e-mail, the password will be MD5, is there anyway to have the original password without being encrypted?
Code:
<?
$email=cleanInput($email);
$status = "OK";
$msg="";
//error_reporting(E_ERROR | E_PARSE | E_CORE_ERROR);
if (!stristr($email,"@") OR !stristr($email,".")) {
$msg="O teu e-mail não esta correcto<BR>";
$status= "NOTOK";}
echo "<br><br>";
if($status=="OK"){ $query="SELECT email,usuario,senha FROM usuarios WHERE email = '$email'";
$st=mysql_query($query);
$recs=mysql_num_rows($st);
$row=mysql_fetch_object($st);
$em=$row->email;// email is stored to a variable
if ($recs == 0) { echo "<center><font face='Verdana' size='2' color=red><b>Este e-mail não contém qualquer senha, por favor <a href='/contactos/contactoa.php'>contacta-nos</a></b><br> Desculpa, o teu e-mail não existe na nossa base de dados, cria uma conta <a href='registro.php'> aqui</a>.</center>"; exit;}
$headers4="[email protected]"; ///// Change this address within quotes to your address ///
$headers.="Reply-to: $headers4\n";
$headers .= "From: $headers4\n";
$headers .= "Errors-to: $headers4\n";
//$headers = "Content-Type: text/html; charset=iso-8859-1\n".$headers;// for html mail un-comment this line
if(mail("$em","Os teus detalhes","Esta é uma resposta automatica do Core5 \n \nNome de Usuario : $row->usuario \n A senha : $row->senha \n\n Muito obrigado, esperemos que continues a usar o Core5. \n \n Administrador do Core5","$headers")){echo "<center><font face='Verdana' size='2' ><b>Obrigado.</b> <br>Iremos enviar os teus dados para o teu e-mail em breve, verifica a tua caixa de entrada nos proximos segundos. </center>";}
else{ echo " <center><font face='Verdana' size='2' color=red >Existe algum problema em enviar os detalhes para o e-mail indicado, <a href='/contactos/contactoa.php'>contacta-nos</a>. <br><br><input type='button' value='Voltar atras' onClick='history.go(-1)'></center></font>";}
}
else {echo "<center><font face='Verdana' size='2' color=red >$msg <br><br><input type='button' value='Voltar atras' onClick='history.go(-1)'></center></font>";}
?>
Ill wait a answer.
Wertex

