RDV+DIAL chat illimit� dans ta r�g!
no save
Assistance
Achat
News

Forum | webmastering
[PHP-MySQL] Afficher Résultats 10 à la fois
jakkihm, le jeu. 08 févr. 2007 à 12:36:29
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 !


GallyNet
févr. 07
Suivant
REPONSES
GallyNet
févr. 07
jakkihm
févr. 07
GallyNet
févr. 07
oberion
févr. 07
jakkihm
févr. 07
jakkihm
févr. 07
Ssylvainsab
févr. 07
rafiko
févr. 08
Version Web
Réalisé par RedShift
no save