Reply to Re: [PHP] Re-inserting newlines

Your name:

Reply:


Posted by Philip Thompson on 10/07/77 11:19

On Jun 23, 2005, at 12:20 PM, John Nichel wrote:

> Philip Thompson wrote:
>
>> Anyone know how/what to replace the \r\n in the textarea to that
>> it shows up correctly with the actual newlines, not the \r\n???
>>
>
> You shouldn't need \r\n. \n should work just fine.
>
> How are you 'inserting' the newlines? Single quoted string?

That's the thing, I'm not inserting \r\n at all. When filling in the
form, I hit "Enter" to go to the next line in the textarea. When I
pull the original data I do:

$textarea = mysql_real_escape_string($_POST["textarea"], $connection);

if ($error) {
// somehow replace the \r\n that mysql_real_escape string put in

// then strip all the other slashes remaining: \' becomes '
$textarea = stripslashes($textarea);

// return to page
}

That clarify it a bit?
~Philip

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация