Bonjour,
Je cherche à afficher les résultats d'une requête 10 à la fois.
La requête que j'ai conçue et qui affiche les résultats dans un tableau fonctionne,
mais je ne voudrais afficher que les 10 premiers résultats et proposer de voir les
autres grâce à un lien.
Voici le code qui affiche mes données:
<form action="mobTables.php" method="POST">
<table cellspacing="0" cellpadding="5" border="0">
<tr>
<th></th>
<th>Nom</th>
<th>Description</th>
<th>Pays</th>
</tr>
<?php
// display data in table
if($sql) {
while($data = mysql_fetch_assoc($sql)) {
echo '<tr>
<td><a href='.$data['photo'].' onClick="window.open(\''.$data['photo'].'\',\'\',\'width=500 height=500,scrollbars=yes,resizable=yes\'); return false;"><img src="'.$data['photo'].'" width="70" height="70" alt="'.$data['name'].'"></a></td>
<td>'.$data['name'].'</td>
<td>'.$data['description'].'</td>
<td>'.$data['country'].'</td>
</tr>';
} // end while
if(mysql_num_rows($sql) == 0) {
$msg.="Aucune information disponible";
}
} // end if $sql
echo "<p class=\"errorMsg\">$msg</p>";
// disconnection
mysql_close();
?>
</table>
</form>
Merci de votre aide !

