HTML interesse |
|
Eerst en vooral wil ik mijn code tonen, zodat jullie weten waarover ik het heb.
<table border="1" cellspacing="0">
<tr><td><b>ID</b></td><td><b>Name</b></td><td><b>Password</b></td><td><b>XP</b></td><td><b>GP</b></td><td><b>Town ID</b></td><td><b>Permission ID</b></td><td><b> </b></td><td><b> </b></td></tr>
<?php
$mysql = mysql_query("SELECT * FROM users", $connection);
$rows = @mysql_num_rows($mysql);
while ($row = @mysql_fetch_array($mysql))
{
?>
<tr><td><?php echo $row['id'] ?></td><td><?php echo $row['username'] ?></td><td><?php echo $row['password'] ?></td><td><?php echo $row['xp'] ?></td><td><?php echo number_format($row['gp'],'','',' ') ?></td><td><?php echo $row['town'] ?></td><td><?php echo $row['permission'] ?></td><td><a href="?page=ban&id=<?php echo $row['id']; ?>&banned=<?php echo $row['banned']; ?>">
<?php if($row['banned'] == "1"){ echo "UNBAN USER!"; } else { echo "BAN USER!"; } ?></a></td><td><a href="?page=edituser&id=<?php echo $row['id']?>">Edit</a></td></tr>
<?php
}
?>
</table>
<table border="1" cellspacing="0"> <tr><td><b>ID</b></td><td><b>Name</b></td><td><b>Password</b></td><td><b>XP</b></td><td><b>GP</b></td><td><b>Town ID</b></td><td><b>Permission ID</b></td><td><b> </b></td><td><b> </b></td></tr> <?php $mysql = mysql_query("SELECT * FROM users", $connection); { ?> <tr><td> <?php echo $row['id'] ?></td><td> <?php echo $row['username'] ?></td><td> <?php echo $row['password'] ?></td><td> <?php echo $row['xp'] ?></td><td> <?php echo number_format($row['gp'],'','',' ') ?></td><td> <?php echo $row['town'] ?></td><td> <?php echo $row['permission'] ?></td><td><a href="?page=ban&id= <?php echo $row['id']; ?>&banned= <?php echo $row['banned']; ?>"> <?php if($row['banned'] == "1"){ echo "UNBAN USER!"; } else { echo "BAN USER!"; } ?></a></td><td><a href="?page=edituser&id= <?php echo $row['id']?>">Edit</a></td></tr> <?php } ?> </table>
Nu toont hij dus de ID van town en van permission. Ik wil dat hij dan naar de table van towns gaat en daar de name van towns neemt waarmee de id overeenstemt met de id dat nu getoont word (deze dat in users staat...).
Thx op voorhand
Drunkenoldma
|