I am using phpbb forum and tried to link the forum from index page of website by including php files that contain following code:

<?php 
 include("config.php");
$result = mysql_query("select * from phpbb_topics WHERE forum_id = 5 ORDER BY topic_id DESC LIMIT 0,10");
while($r=mysql_fetch_array($result))
{ 
$topic=$r["topic_title"]; 
$link=$r["topic_id"];
echo "&raquo;";
echo "&nbsp;";
echo "<a href=forum/viewtopic.php?t=$link>";
echo $topic;
echo "</a>";
echo "<br>";
}
 ?>


Config.php
has following code

<?php
error_reporting(E_ALL ^ E_NOTICE);

$host="localhost";
$db="xxxxxx";
$db_user="xxxxx";
$db_pwd="xxxxx";

$cnx = @mysql_connect($host, $db_user, $db_pwd) or die(" <br><p><font 
face='Verdana' size='2' color='red'><center><b> Cannot connect to the 
database at the current time.</b></center></p>" . mysql_error());

mysql_select_db($db, $cnx);

?>

What's the problem?


You can visit the site at http://microbialworld.com/index1.php

What error are you receiving?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.