Nieuw lid |
|
Hallo,
ik gebruik deze code om gegevens uit men db te halen maar ze worden niet getoond op de pagina.
de mysql_num_rows word dan weer wel getoond dus connectie met db is het niet
<?php
$query = "SELECT username, user_id, user_email, user_type FROM `users` ";
$sql = mysql_query($query) or die ( mysql_error( ) );
$aantal = mysql_num_rows($sql);
while($record = mysql_fetch_object($sql));
{
print "
<tr>
<td width=\"100\" height=\"15\">".$record->username."</td>
<td width=\"90\" height=\"15\">".$record->user_id."</td>
<td width=\"90\" height=\"15\">".$record->user_email."</td>
<td width=\"75\" height=\"15\">".$record->user_type."</td>
</tr>
<tr>
<td width=\"100\" height=\"5\"></td>
<td width=\"90\" height=\"5\"></td>
<td width=\"90\" height=\"5\"></td>
<td width=\"75\" height=\"5\"></td>
</tr>";
}
?>
<?php $query = "SELECT username, user_id, user_email, user_type FROM `users` "; { <tr> <td width=\"100\" height=\"15\">".$record->username."</td> <td width=\"90\" height=\"15\">".$record->user_id."</td> <td width=\"90\" height=\"15\">".$record->user_email."</td> <td width=\"75\" height=\"15\">".$record->user_type."</td> </tr> <tr> <td width=\"100\" height=\"5\"></td> <td width=\"90\" height=\"5\"></td> <td width=\"90\" height=\"5\"></td> <td width=\"75\" height=\"5\"></td> </tr>"; } ?>
|