Hi all,
Basically I am updating some data in my db with the following script:
$LinkDesc = mysql_real_escape_string($_POST['LinkDesc']);
$sql = "UPDATE tbl_content SET content1 = '$LinkDesc' WHERE section_name = 'contribute'";
mysql_query($sql) or die('Error, update link failed : ' . mysql_error());
All good. It inserts fine, however the user is going to be using line breaks in the data that is being inserted/updated like so:
data data data data data data data data data data
data data data data data data data data data data
data data data
data data data data data data data data data data
data data data data data data
My aim is to then select this data from the db and display it with this line break formatting intact. Currently I am successfully displaying this data but there is no formatting.
Is there a way to show this formatting??? maybe something like detect a line break (is this /n ?) and if so show this as <br /> ???
Any suggestions would be greatly appreciated. Thanks.