sngskunk
12-10-2005, 07:10 PM
Okay so i created a news system, were i can psot news on my site and others can view it, but there is a problem. I will give you an example first.
Form Box (Begining)
Welcome to the site.
Enjoy your stay!
Form Box (End)
So I post that and it inserts it into my Mysql database. But, when i go to view it on my site it will show up like this.
News Show (Begin)
Welcome to the site. Enjoy your stay!
News Show (End)
Why did it not put in the line space, it just puts them together. So i go check my mysql table and in the table it inserted the space. But, when it come out on the site there is no space. Why?
If this helps to show the news i use this code.
<?php
include "db.php";
$query="SELECT * FROM site_news ORDER BY id DESC LIMIT 8";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$title=mysql_result($result,$i,"title");
$date=mysql_result($result,$i,"date");
$image=mysql_result($result,$i,"image");
$text=mysql_result($result,$i,"text");
$name=mysql_result($result,$i,"name");
//I changed below just to give you an idea, it is really a bunch over tables to give the right look
echo $title;
echo "<br>"
echo $text;
$i++;
}
?>
Help Please!!
Form Box (Begining)
Welcome to the site.
Enjoy your stay!
Form Box (End)
So I post that and it inserts it into my Mysql database. But, when i go to view it on my site it will show up like this.
News Show (Begin)
Welcome to the site. Enjoy your stay!
News Show (End)
Why did it not put in the line space, it just puts them together. So i go check my mysql table and in the table it inserted the space. But, when it come out on the site there is no space. Why?
If this helps to show the news i use this code.
<?php
include "db.php";
$query="SELECT * FROM site_news ORDER BY id DESC LIMIT 8";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
$title=mysql_result($result,$i,"title");
$date=mysql_result($result,$i,"date");
$image=mysql_result($result,$i,"image");
$text=mysql_result($result,$i,"text");
$name=mysql_result($result,$i,"name");
//I changed below just to give you an idea, it is really a bunch over tables to give the right look
echo $title;
echo "<br>"
echo $text;
$i++;
}
?>
Help Please!!
