----------------------------users.php------------------------------------
if ($logged_in_user) {
dbConnect();
$result = mysql_query("SELECT name FROM members");
page_top();
page_header("W e l c o m e t o t h e U s e r s P a g e.");
echo "<table border='0' width='300' align='center' class='table2' cellspacing='1' cellpadding='3' bgcolor='#000000'>";
echo "<tr><td width='100%' align='center' bgcolor='#0B151F'><font color='#DFA018' size='2'><b>All registered Users</b></font></td></tr>";
while($queryresult = mysql_fetch_array($result)) {
$userinfo = $queryresult["name"];
echo "<tr><td bgcolor='142E45' align='center'><a href='userdetails.php?user=".$userinfo."'>$userinfo</a></td></tr>";
}
echo "</table><br>";
echo " • <a href='members.php?username=".$logged_in_user."'>Go Back</a>";
page_bottom();
}
------------------------------------------------------------------------
----------------------------userdetails.php----------------------------
if ($logged_in_user) {
dbConnect();
$result = mysql_query("SELECT * FROM members WHERE name = '".$userinfo."'");
page_top();
page_header("User Details on ".$userinfo.".");
echo "<table border='0' width='300' align='center' class='table2' cellspacing='1' cellpadding='3' bgcolor='#000000'>";
while($queryresult = mysql_fetch_array($result)) {
echo "<tr><td width='50%' bgcolor='#142E45'><b>First Name:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["first_name"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#09111B'><b>Last Name:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["last_name"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#142E45'><b>Age:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["age"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#09111B'><b>Sex:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["sex"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#142E45'><b>State:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["state"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#09111B'><b>Email:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["email"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#142E45'><b>Aim/Aol Screenname:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["aolsn"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#09111B'><b>MSN:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["msn"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#142E45'><b>ICQ:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["icq"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#09111B'><b>CS Nickname:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["cs_nickname"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#142E45'><b>Playing for:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["time_playing"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#09111B'><b>Favorite Map:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["fav_map"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#142E45'><b>Favorite Weapon:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["fav_weapon"]."</td></tr>";
echo "<tr><td width='50%' bgcolor='#09111B'><b>Favorite Team:</b></td><td width='50%' bgcolor='#000000'>".$queryresult["fav_team"]."</td></tr>";
}
echo "</table>";
page_bottom();
}
-----------------------------------------------------------------------
I dont understand why its not working, it shows information for 1 user on every user that you click, any help would be gratefull, so thankyou!