Adastra Posted August 9, 2007 Share Posted August 9, 2007 I'm sending an e-mail via a contact form, but somehow the lines aren't breaking in the text, it always looks like this: lorem ipsum\r\n\r\dolor\r\n\r\n\r\sit\r\n\r\amet\r\n\r\n\r\lorem Which is of course not readable at all. What am I doing wrong here? I'm using a few security checks and such for cleaning the field up; $text = trim($text); ... $text = stripslashes(strip_tags($text)); ... $text = mysql_real_escape_string($text); ..... #and then the part where it's included in the message: $message .= "Nachricht: {$text} \n"; Can any of those be causing the display problem? Quote Link to comment https://forums.phpfreaks.com/topic/64091-e-mail-not-breaking-lines/ Share on other sites More sharing options...
Fadion Posted August 9, 2007 Share Posted August 9, 2007 When using single quotes u cant display \n as newline, but with double quotes it must be ok. I tried it with mysql_real_escape and addslashes and its displaying ok at me. Dont know whats going wrong... Quote Link to comment https://forums.phpfreaks.com/topic/64091-e-mail-not-breaking-lines/#findComment-319427 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.