$con = mysql_connect("localhost", "root", "321");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$db_selected = mysql_select_db("test_db",$con);
$sql="select sum(posts) from forum where fup=1";
$result = mysql_query($sql,$con);
$row=mysql_fetch_row($rset);
echo $row[0];
mysql_close($con);
?>