"; while ($r = mysql_fetch_array($result)) { $content .= "

$r[title]

$r[date]

$r[news]\n"; if ($news_info == 1) { $content .= "
Posted by $r[author]
\n"; } $showed=1; } $content .= "

More news

\n"; if ($showed==1) {echo $content;} if ($showed!=1) { echo "

COTNS News

Click on a title to view the whole article.

"; $db = mysql_connect($dbhost,$dbuser,$dbpass); mysql_select_db($dbname) or die("Cannot connect to database"); $query = "SELECT * FROM blognews ORDER BY id $news_format LIMIT $news_limit"; $result = mysql_query($query); echo "\n"; } ?>