Jump to content

\r\n (line break not working in IE


~n[EO]n~

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.