Je cherche a afficher dans un tableau les utilisateurs présents dans ma base.
voici le code source de ma page:
et voici ma fonction GetUserList()
Je récupère une erreur Parse error: syntax error, unexpected '<' sur la première ligne de ma boucle
Modifié par pieryv (29 Nov 2011 - 10:38)
voici le code source de ma page:
<table width="880px" border="0" align="center" cellpadding="0" cellspacing="0" style="background-color: #333; color: white;">
<tr height="30px">
<th width="150px">Nom</th>
<th width="200px">Username</th>
<th width="120px">Password</th>
<th width="">Email</th>
<th width="50px">Statut</th>
<th width="50px">Accès</th>
<th width="120px">Dernière connexion</th>
</tr>
<?php
GetUserList();
?>
<tr>
</tr>
</table>
et voici ma fonction GetUserList()
function GetUserList(){
global $pretext;
$sql= mysql_query('SELECT * FROM ".$pretext."_users ORDER BY ACCESS ASC');
while ($result = mysql_fetch_array($sql)){
<tr>
<td><?php echo '$result['name']'; ?></td>
<td><?php echo '$result['username']'; ?></td>
<td><?php echo '$result['password']'; ?></td>
<td><?php echo '$result['email']'; ?></td>
<td><?php echo '$result['statut']'; ?></td>
<td><?php echo '$result['access']'; ?></td>
<td><?php echo '$result['last_connexion']'; ?></td>
</tr>
}
}
Je récupère une erreur Parse error: syntax error, unexpected '<' sur la première ligne de ma boucle

Modifié par pieryv (29 Nov 2011 - 10:38)