hello ...
i am using wordpress 1.5 (a blog) to publish news on fonearena.com
I enter text in wordpress and post messages in the blog . when i view post in wordpress the text has proper formatting and spacing.
Now i need to use the same messages for my website .
i wrote a simple sql query for tht .
The text is stored in a longtext field
The text is getting displayed but is not at all formatted
Code:
while ($row = mysql_fetch_array($sql_res
ult)) {
$nid=$row["ID"];
$post_title = $row["post_title"];
$post_excerpt = $row["post_excerpt"];
$post_date = $row["post_date"];
$post_author = $row["post_author"];
$post_content =$row["post_content"];
$sqlauthor="SELECT user_nickname from wp_users WHERE id='$post_author' LIMIT 1";
$sqlauthor_result = mysql_query($sqlauthor,$co
nnection) or die("Couldn`t execute query.");
$author=@MYSQL_RESULT($sql
author_res
ult,0,"use
r_nickname
");
$sqlcat="SELECT category_id from wp_post2cat WHERE post_id='$nid' LIMIT 1";
$sqlcat_result = mysql_query($sqlcat,$conne
ction) or die("Couldn`t execute query.");
$catid=@MYSQL_RESULT($sqlc
at_result,
0,"categor
y_id");
$sqlcatname="SELECT cat_name from wp_categories WHERE cat_ID='$catid' LIMIT 1";
$sqlcatname_result = mysql_query($sqlcatname,$c
onnection)
or die("Couldn`t execute query.");
$catname=@MYSQL_RESULT($sq
lcatname_r
esult,0,"c
at_name");
echo"<h2>$post_title</h2>"
;
echo"$post_content";
for example
http://fonearena.com/?page=fullstory&nid=4Quote:
R World generates Rs 1 cr revenue in two days
MUMBAI: Reliance Infocomm earned Rs one crore within two days of making its R World service paid. According to the company, the first Indo-Pak one-day match at Kochi contributed much of the Rs one crore revenue. The company estimates revenue of Rs 25 crore per month from R World. According to the company, the popularity of R World remained high even after it was made paid service on April 1. The Java and Brew-based R World suite offers over 150 applications, including railway ticket booking and exam results, and the charges range from Rs two to Rs 25.
the content is not formatted properly
but same message in word press
http://fonearena.com/blog/?p=4Quote:
R World generates Rs 1 cr revenue in two days
MUMBAI: Reliance Infocomm earned Rs one crore within two days of making its R World service paid. According to the company, the first Indo-Pak one-day match at Kochi contributed much of the Rs one crore revenue. The company estimates revenue of Rs 25 crore per month from R World.
According to the company, the popularity of R World remained high even after it was made paid service on April 1. The Java and Brew-based R World suite offers over 150 applications, including railway ticket booking and exam results, and the charges range from Rs two to Rs 25.
can someone help me with regards to how to format the text output