i have one text area
<textarea name="message" id="message" class="text_field" style="height:200px; width:500px"></textarea>
if i type data in the text area like this
hello
this is my test message
bye
'abc'
i use following statement to get data from text area
var message = $('#message').attr('value');
i pass this value to other php file like
var data = {message:message};
$.ajax({
type: "POST",
url: "show.php",
data: data,
etc
when i see data in post value firebug in show exactly i type the data (with new lines & spaces etc) and in php file
$message=$_POST['message'];
$Content = file_get_contents($temp_page);
$Content = str_replace('%%a%%', $message, $Content);
now when i use
echo $Content
i get all the text in one line not exact i type in text area...
hello this is my test message bye 'abc'
Thanks