What im trying to do is display a roster for my online game community.
I have a table in my database called "roster" ... in that table, there are rows called "game". Game is the primary game played by the user. Then I have "game2", "game3" and "game4".
I have a game.php page, where it displays game.php?game=bhd. This will display all of the players who play bhd... now my problem is...
How do I integrate game2, game3 and game4 into my script, so if that they play another game (bhd, mohaa, bf1942, or jops), when game.php?game=bhd is called, players with the main game of mohaa, and game2 of bhd will be displayed when game.php?game=bhd is called.
Here is my script as it is right now...
This will just display users "game" choice, without game2 etc...
Can someone please help...
<?php
$db = mysql_connect("localhost","jointops_xfactor","xxxxxxxxx");
mysql_select_db (jointops_xfactor);$sql = "SELECT * FROM roster WHERE game='{$_REQUEST['game']}' and status='inactive'";
if (!$result = mysql_query($sql)) {
print "Invalid query ($sql) : " . mysql_error();
exit;
}
while ($row = mysql_fetch_assoc($result)) {
print "<table width=598 align=center>
<tr>
<td width=20%><a href=soldier.php?soldierid={$row['soldierid']}><font face=Verdana size=1 color=8d8d8d><B>{$row['name']}</B></a></td>
<td width=20%><center><font face=Verdana size=1 color=FFFFFF>{$row['rank']}</td>
<td width=20%><center><font face=Verdana size=1 color=FFFFFF>{$row['joined']}</td>
<td width=20%><center><font face=Verdana size=1 color=FFFFFF>{$row['specialty']}</td>
<td width=20%><center><font face=Verdana size=1 color=FFFFFF>{$row['location']}</td></tr>
<tr>
<td colspan=5 width=100% bgcolor=444444 height=2>
</td></tr>
</table>";
}
?>