Jump to content

[SOLVED] calling data from database doesnt include line breaks


brem13

Recommended Posts

i got a simple blog page on my site and if someone enters a blog and they write it in this format...

hey,

this

is

a

blog.

 

it will all show up properly in the database when i look at it, but when its called back to be viewed on the page, it shows up like this

hey,thisisablog.

here is the code i use to call it back...

 

 

mysql_connect($server, $db_user, $db_pass) or die (mysql_error()); 
$result = mysql_db_query($database, "select * from $table WHERE id = '$id'") or die (mysql_error()); 
while ($qry = mysql_fetch_array($result)) {
echo '<font face=tahoma size=2><strong>';
echo $qry[name];
echo '</strong><br><hr align=left width=200px>';
echo $qry[message]; 
echo '</font><br><br>';
echo '<font face=tahoma size=1><strong>Date Created:</strong> '.$qry[date_created].' - <strong>Date Modified:</strong> '.$qry[date_modified];

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.