Jump to content

Recommended Posts

if you could post some more code it would be helpfull

<?php if (empty($app->errors)) {

	 $tbl=new Model;
	 $tbl->_id_name="mem_id";
	 $tbl->_table_name=MEMBER_TABLE;

		$frm_mail = addslashes($_REQUEST['mem_email']);

		$sSql="Select mem_password from ".MEMBER_TABLE." where mem_email='$frm_mail'";
		//echo $sSql;
		$result=mysql_query($sSql) or die("Your have an error because:<br />" . mysql_error());
		if(mysql_num_rows($result)!=0)
		{
		$array=mysql_fetch_array($result);
		$yourpassword = $array['mem_password'];
		$_SESSION['yourpwd'] = $yourpassword;
		$formail_pwd = TRUE;
		}
		else
		{
			$app->error_display_type=2;
		 	$app->error("E-mail id could not be found.");
		 	$formail_pwd = FALSE;
		}


		 if ($formail_pwd=TRUE) 
			{
			$title="Your password";
			$to=@$_REQUEST['mem_email'];
			$body="Password :".$_SESSION['yourpwd']."\r\n"."Please note down the password and keep in safe place, Thanks.";
			$mail=new PHPMailer;
			$success=$mail->sendmail($to,$title,$body,ADMIN_EMAIL);
			$app->error_display_type=2;
			$app->error("Your password has been sent.");
			$_REQUEST['mem_email'] = "";
			}
			else
			{
			$app->error_display_type=2;
		 	$app->error("Mail could not be sent.");
			}


		}
		else{
		 $app->error("E-mail id could not be found.");
	  }

} ?>

 

@Wuhtzu

 

Why do you talk about IE and FF if $body goes into an e-mail?

 

 

In IE, the message "Please note down...." is coming next to the password, in FF it is coming in new line .

 

Thanks

i seen you put the password in the session you just output it as the array value. Putting the password in the session is a security hole.

 

Yes you are right, only keeping this

$yourpassword = $array['mem_password'];

 

and using this variable to send the password did not work, so I kept it in Session, so what is the solution...

 

Thanks for replying everybody

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.