Forum Moderators: coopster
<?php $countwhat = "name_of_table"; include('../count.php'); ?> <?php
$con = mysql_connect("localhost","u_censored","p_censored");
if (!$con){
die('Could not connect: ' . mysql_error());
}
mysql_select_db("db_censored", $con);
$result = mysql_query("SELECT * FROM '?countwhat'");
if($row = mysql_fetch_array($result)){
$the_topic = $row['topic_id'];
$sql="SELECT * FROM '?countwhat'";
$count_result=mysql_query($sql);
$count=mysql_num_rows($count_result);
echo "" . $count . " post";
if ($count = '1'){
echo "s";
}
}
?>