Jump to content

Recommended Posts

Hi,

 

I have a registration code by which user registers and his chosen password is stored in MD5 format in the database.

 

Now, I have coded a FORGOT YOUR PASSWORD? script which sends the user the password to his e-mail address. Thing is PHP sends the MD5ed password. How can I get it to send a unMD5ed password?

 

Thanks.

 

Here is part of the code

$email=$_POST['email'];

$sql="SELECT password FROM customer WHERE email = '$email'";
$result=mysql_query($sql);

$count=mysql_num_rows($result);

	if($count == 1)
	{
		$rows=mysql_fetch_array($result);

		$pass=$rows['password'];

######### SEND THE PASSWORD TO THE E-MAIL SUPPLIED ########## 

$to = $email; 
$subject = 'Your Account Password at Express PC Sales '; 

$message = "
Here is the Password for your Account at Express PC Sales.

Your password is $pass  .

Regards, 
Team @ Express PC Sales "; 

$headers = 'From: Express PC Sales <zahidworld@hotmail.com> ';

$sentmail = mail($to, $subject, $message, $headers);

 

And here's the mail sent.

 

From :  Express PC Sales <zahidworld@hotmail.com> 
Sent :  26 May 2007 23:12:02 
To :  zahidworld@hotmail.com 
Subject :  Your Account Password at Express PC Sales 
  
  |  |  | Inbox 


Here is the Password for your Account at Express PC Sales.

Your password is 81dc9bdb52d04dc20036dbd8313ed055  .

Regards, 
Team @ Express PC Sales 

I just did something else. Quite cheeky actually... lol   ;D

 

I put this in the E-mail message :

 

 

 

$message = "

Here is the Password for your Account at Express PC Sales.

 

Your encrypted password is $pass  .

 

Please visit  - www.md5encryption.com -  to decrypt the above encrypted password and obtain your actual password.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.