Okay, I have two mysql tables. Users, and Ranks.
In my ranks table, I have rankID, and rank. The rankID corresponds to a rank.
In my users table, there is a rankID column (references the ranks table)
Now I am connecting to the users table, and pulling out all the information, and am printing it in a table, using the following:
<?php
$connection = mysql_connect("localhost" , "root" ,"")
or die("cannot make connection");
$db = mysql_select_db("db")
or die("cannot find database");
$sql_query = "SELECT * FROM users ORDER BY rankID desc";
$result = mysql_query("$sql_query");
?>
<?php
while ($rows = mysql_fetch_row($result))
{
?>
<tr>
<td width="29%"><?php echo $rows[2]; ?></td>
<td width="35%">RANK!!!<td>
</tr>
<?php } ?>
Thats what I have now, and it works, but instead of RANK!!, I want it to display the value "rank" in the "ranks" table.. How do i do it?!?!
THANK YUOU I LOVE YOU!