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];

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.