Affichage par page - php

Bonjour,
j'aurais vraiment besoin de votre aide svp, je doi afficher un livre d'or page par page php mysql.
mais ca ne marche pas,
Je vous joint mon code php,
Merci !

<?php

$total=0;
$parpage=5;
if(isset($_GET['page']))
$page=$_GET['page'];
else
$page=0;
$commaff= mysql_query("SELECT * from ".T_LIVREDOR." where etat='1' order by id desc ");
while ($donnees = mysql_fetch_array($commaff))
{

echo'
<table id="Tableau_7" width="496" height="104" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><img src="/images/actualite_01.png" width="496" height="20" alt=""></td>
</tr>
<tr>
<td>
<table width="496" border="0" height="64" cellspacing="0" cellpadding="0">
<tr>
<td background="/images/actualite_02.png"><div align="center">
<table width="90%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td><fieldset class="encemoment">
<legend><em><span class="Style15 Style22"><em>Message laissé par<strong><span class="Style22 Style15"> '.stripslashes ($donnees['nom']). '</span> </strong>le '.$donnees[5].' à '.$donnees[6].'</em></span><strong><span class="Style22 Style15"><br />
</span></strong></em></legend>
<div align="center">
<table width="95%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td><div align="left"><span class="Style15">Ville :
'.stripslashes ($donnees['ville']).'
</span>
<table width="95%" border="1" cellpadding="5" cellspacing="0" bordercolor="#7B0E87" bgcolor="#5A0A63">
<tr>
<td class="Style2">'.stripslashes ($donnees['message']).'</td>
</tr>
</table>
<a href="mailto:'.stripslashes ($donnees['email']).'"><span class="Style15">'.stripslashes ($donnees['email']).'<br>
</span></a></div></td>
</tr>
</table>
</div>
</fieldset></td>
</tr>
</table>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="/images/actualite_03.png" width="496" height="20" alt=""></td>
</tr>
</table>
';

}
?>
Configuration: Windows XP
Internet Explorer 7.0

1 réponse

  1. Bonjour,

    T_LIVREDOR-> c'est une variable, si oui tu a oublié le $ devant
    $T_LIVREDOR.
    mais je suis pas un grand connaisseur
    1. non, tout est bon pour T_livredor, c'est ma table mysql defini dans ma configuration, pour ca, tout marche, juste que je c pas faire le page par page, merci beaucoup pour ton aide.

      Antho