<?php
//after connecting etc..
$username = $_SESSION['username'];
$string = "SELECT msg FROM $table WHERE username='$username'";
$result = mysql_fetch_array(mysql_query($string)) or die(mysql_error());
echo $result[msg];
?>
this is how the database is..
I wanted to install the database base.
I wanted to install the database server.
I wanted to install the Ubuntu.
when i retrieve them they appear as..
I wanted to install the database base.I wanted to install the database server.I wanted to install the Ubuntu.
Its a TEXT field.. is there a way to make them appear with the new lines? exactly the same?
Thanks a lot!
echo "<pre>".$result[msg]."</pre>";to check do newlines appear in code (or just take a look of output source). If does, convert newlines to<br />(nl2brfunction) and use it inside your html document.