Hi,
ich habe ein Problem, mein Member Script, gibt nur einen Suer aus und ich weiß nicht warum:
ich habe ein Problem, mein Member Script, gibt nur einen Suer aus und ich weiß nicht warum:
PHP-Code:
<?php
<?php
include ("verbindung.php");
echo '
<center>
<table class="members">
<tr>
<td class="head">Name</td>
<td class="head" width="7%">Profil</td>
<td class="head" width="5%">PM</td>
<td class="head" width="15%">Rang</td>
<td class="head" width="15%">Mitglied seit</td>
</tr>
<tr>';
$i=0;
$sql = "SELECT id, username, rang, date FROM user ";
$result = mysql_query($sql) or die(mysql_error().'
Query: '.$sql);
while ($members = mysql_fetch_array($result)) {
$id[] = $members["id"];
$username[] = $members["username"];
$rang[] = $members["rang"];
$date[] = $members["date"];
}
for ($i = 0; $i < count($id); $i++) {
if($i%2==0){$bgcolor="#C0C0C0";}
else{$bgcolor="#808080";}
echo'
<td bgcolor="'.$bgcolor.'" >'.$username[$i].'</td>
<td bgcolor="'.$bgcolor.'" width="7%">[url="members_profil.php?id='.$id[$i].'"]Profil[/url]</td>
<td bgcolor="'.$bgcolor.'" width="5%">[url="pm.php?reciever='.$id[$i].'"]PM[/url]</td>
<td bgcolor="'.$bgcolor.'" width="15%">'.$rang[$i].'</td>
<td bgcolor="'.$bgcolor.'" width="15%">'.$date[$i].'</td>
';
$i++;
}
echo'
</tr>
</table>
</center>
';
?>
?>
Kommentar