yah, you need to totally kill that one. it's totally screwed up.
just replace that portal_box_3.php with:
<?php
/* PHP CODE HERE */
/* BODY HERE */
$body = <<<EOF
EOF;
?>
there are too many errors in that puppy to even begin to try to debug. dunno what someone was trying to do there..
this code:
<?php
// Open and select database
$link = mysql_connect('server','username','password');
if (!$link)
{
die('Cannot connect to server: '.mysql_error());
}
$db = mysql_select_db('database',$link);
if (!$db)
{
die('Cannot select database: '. mysql_error());
}
// Find out post id's
$query = "SELECT * FROM ubbt_TOPICS ORDER BY TOPIC_VIEWS DESC";
$result = mysql_query($query);
if (!$result)
{
die('Cannot read from database: '.mysql_error());
}
// Build table
for ($i=0; $i <$num_results; $i++)
{
$rowid = mysql_fetch_array($result);
$postid=$rowid['POST_ID'];
$queryposting = "SELECT * FROM ubbt_POSTS where TOPIC_SUBJECT=".$topicsubject."";
$resultposting = mysql_query($queryposting);
if (!$result)
{
die('Cannot read from database: '.mysql_error());
}
echo '<div style="float:right">'.$topicviews.'</div>';
echo '<div style="float:right">'.$topicsubject.'</div>';
}
?>
is destined to fail
