par
LoBi0 » 11 avr. 2005, 10:59
Il te suffi d'intégrer ton tableau avec ton while en ajoutant 1 ligne à chaque passage, essaye ça :
[code]
<?php
echo ("<table><tr><td>Entete1</td><td>Entete2</td>...</tr>");
$lien = mysql_connect('localhost', 'root', '');
mysql_select_db('technique', $lien);
$requete = mysql_query("SELECT * FROM gestion_machine");
while($recup = mysql_fetch_array($requete)) {
echo("<tr>");
echo("<td>");
echo $recup[champ1];
echo("</td>");
echo("<td>");
echo $recup[champ2];
echo("</td>");
echo("<td>");
echo $recup[champ3];
echo("</td>");
//Pour un lien (exemple):
echo("<td>");
echo("<a href=\"script.php?page=".$recup[champ4]."\">".$recup[champ4]."</a>");
echo("</td>
echo("</tr>");
}
echo("</table");
?>
[/code]
Il te suffi d'intégrer ton tableau avec ton while en ajoutant 1 ligne à chaque passage, essaye ça :
[code]
<?php
echo ("<table><tr><td>Entete1</td><td>Entete2</td>...</tr>");
$lien = mysql_connect('localhost', 'root', '');
mysql_select_db('technique', $lien);
$requete = mysql_query("SELECT * FROM gestion_machine");
while($recup = mysql_fetch_array($requete)) {
echo("<tr>");
echo("<td>");
echo $recup[champ1];
echo("</td>");
echo("<td>");
echo $recup[champ2];
echo("</td>");
echo("<td>");
echo $recup[champ3];
echo("</td>");
//Pour un lien (exemple):
echo("<td>");
echo("<a href=\"script.php?page=".$recup[champ4]."\">".$recup[champ4]."</a>");
echo("</td>
echo("</tr>");
}
echo("</table");
?>
[/code]