when clicking on the users link it displays no users but if you do it like this http://mysite.com/profile.php?id=415 it displays peoples profile. so how do i fix this problem.
[php]<?php
include (“session.php”);
include (“includes/db.php”);
?>
Users
<?php $result=mysql_query("select count(*) from users"); $row=mysql_fetch_row($result); $tr=$row[0]; $rpp=10;
$pn=1;
if(isset($_GET[‘pn’]))
{
$pn=$_GET[‘pn’];
}
$tp=($tr/$rpp);
if($tr%$rpp>0)
{
$tp++;
}
$from=(($pn-1)$rpp)+1;
$to=($pn)($rpp);
$result=mysql_query(“select * from users where uid between $from and $to”);
while($row=mysql_fetch_row($result))
{
$userid=$row[0];
$lowercase = strtolower($row[3]);
$image = md5($lowercase);
echo “
echo “”;
echo “
if($uid==$userid)
{
echo “
}
else
{
$f_command="select * from follow_user WHERE uid_fk=’$uid’ and following_uid=’$userid’ ";
$user_sql=mysql_query($f_command);
$count=mysql_num_rows($user_sql);
if($count==0)
{
echo "“;
echo”";
}
else
{
echo "“;
echo”";
}
}
echo “
echo “”;
echo “
}
echo “
- ”;
- $i ”;
for($i=1;$i<=$tp;$i++)
{
echo “
}
echo “
?>