Hi there,

I am using CKEditor, a rich text editor. I am using PHP validation. I am trying to display the text area value provided by the user input into the new text area once submitted.

The problem is I am getting an output with "\r\n" rather than it actually processing this as a new line.

When displaying similar content in the text-area from a database, it works fine. But when it is retrieved from a POST var, it doesn't like it.

<?php
echo "<textarea class='textArea' name='content".$id."'>";
    if(isset($_POST['content'])&&!isset($_GET['success'])){ echo $_POST['content'];}
echo "</textarea>";
?>

Is there a PHP function that will sort this. Or does anyone have any function to solve it.

Any help would be kindly appreciated.

Cheers

Danny

try echo stripslashes($_POST['content']);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.