I am creating a insertion query and retrieving the query by php and setup the data to input form using jQuery. but there is a new line issue which showing jQuery error and data not showing in input form. the sql insert query was :
INSERT INTO challan (to_messers,challan_date,address,transportation_type,trailer_no,driver_name,in_outstatus,vessel_name,rotation_no,voyage_no,yard_no,country_name,gate_no,remarks) VALUES ("Marks textile","2016-01-15","Welcome","CCTCL","DME-233000","Maksud","GateIn","KOTA AKBAR","2015/2069","X","Yard-1","16","Gate-4","test text\r\nweldone")
After inserting when I retrieving the data and want to show it using jquery like below one
$('textarea[name=descript]').html("<?php echo $remarks; ?>");
It will be broken down to new line. check the image
Also mysql database input data is showing like below image
The text should be like this one.
"test text\r\nweldone"
I actually didn't understand quite cleary this part. if I change the input to double slash. "test text\r\nweldone"
than it will ok and show the format correctly like "test text\r\nweldone"
Please help me on this matter how can my sql query have \\r\\n
slash.