[In reply to earlier thread]
OK,... I have an error in the second for loop, and the 2 for loops have the same exact code in them. This is the error I get :
Warning: Supplied argument is not a valid MySQL result resource in /home/levxnet/public_html/forum/postview.php on line 90
Perhaps that could clear some things up? (Line 90 is pointed to)
for($count=20; $count>=$last; $count--)
{
echo "<TR>";
$sql=mysql_query("SELECT FROM users WHERE name='$post[$count][user]'", $connect);
$user=mysql_fetch_array($sql);
$sql2=mysql_query("SELECT number FROM posts WHERE user='$post[$count][user]'", $connect);
$totalposts=mysql_num_rows($sql2);
echo "<TD WIDTH='30%'>".$post[$count][user]."<BR>".$user[status]."<BR>".$totalposts."<BR>".dconvert($post[$count][date]);
echo "</TD><TD WIDTH='70%'>".$post[$count][post]."</TD></TR><BR>";
if($count == $last)
{
echo "</TABLE>";
}
}
}
if($page == 1)
{
for($count=$first; $count>=$last; $count--)
{
echo "<TR>";
$sql=mysql_query("SELECT FROM users WHERE name='$post[$count][user]'", $connect);
(LINE 90)$user=mysql_fetch_array($sql);
$sql2=mysql_query("SELECT number FROM posts WHERE user='$post[$count][user]'", $connect);
$totalposts=mysql_num_rows($sql2);
echo "<TD WIDTH='30%'>".$post[$count][user]."<BR>".$user[status]."<BR>".$totalposts."<BR>".dconvert($post[$count][date]);
echo "</TD><TD WIDTH='70%'>".$post[$count][post]."</TD></TR><BR>";
if($count == $last)
{
echo "</TABLE>";
}
}
}