~n[EO]n~ Posted October 31, 2007 Share Posted October 31, 2007 hi I got this $body="Password :".$_SESSION['yourpwd']."\r\n"."Please note down the password and keep in safe place, Thanks."; The password and the message comes in different line in FF, but it comes together in IE, Any reasons thanks Link to comment https://forums.phpfreaks.com/topic/75475-rn-line-break-not-working-in-ie/ Share on other sites More sharing options...
rajivgonsalves Posted October 31, 2007 Share Posted October 31, 2007 are you outputting to the browser ? then it has to be <BR> Link to comment https://forums.phpfreaks.com/topic/75475-rn-line-break-not-working-in-ie/#findComment-381793 Share on other sites More sharing options...
~n[EO]n~ Posted October 31, 2007 Author Share Posted October 31, 2007 are you outputting to the browser ? then it has to be <BR> BR is for html mail, i am sending only plain text When i keep <br> It comes like this Password :aherty <br> Please note down the password and keep in safe place, Thanks. Link to comment https://forums.phpfreaks.com/topic/75475-rn-line-break-not-working-in-ie/#findComment-381795 Share on other sites More sharing options...
rajivgonsalves Posted October 31, 2007 Share Posted October 31, 2007 if you could post some more code it would be helpfull Link to comment https://forums.phpfreaks.com/topic/75475-rn-line-break-not-working-in-ie/#findComment-381799 Share on other sites More sharing options...
Wuhtzu Posted October 31, 2007 Share Posted October 31, 2007 Why do you talk about IE and FF if $body goes into an e-mail? Link to comment https://forums.phpfreaks.com/topic/75475-rn-line-break-not-working-in-ie/#findComment-381803 Share on other sites More sharing options...
~n[EO]n~ Posted October 31, 2007 Author Share Posted October 31, 2007 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 Link to comment https://forums.phpfreaks.com/topic/75475-rn-line-break-not-working-in-ie/#findComment-381827 Share on other sites More sharing options...
Wuhtzu Posted October 31, 2007 Share Posted October 31, 2007 Use \n instead of \r\n Link to comment https://forums.phpfreaks.com/topic/75475-rn-line-break-not-working-in-ie/#findComment-381866 Share on other sites More sharing options...
atlanta Posted October 31, 2007 Share Posted October 31, 2007 Yea try just using \n also 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. Link to comment https://forums.phpfreaks.com/topic/75475-rn-line-break-not-working-in-ie/#findComment-381871 Share on other sites More sharing options...
~n[EO]n~ Posted October 31, 2007 Author Share Posted October 31, 2007 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 Link to comment https://forums.phpfreaks.com/topic/75475-rn-line-break-not-working-in-ie/#findComment-381965 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.