Voila j'ai ecrit le code suivant.
J'ai un tableau avec un certain nombre de colonne. Dont une pour modifier.
Voici le code et ensuite ma question :
<?php
require_once ("Acces_BDPROJETS.php");
// selectionner la base et la variable du pconnect se trouvant dans le fichier Acces_BDPROJETS.php
@mysql_select_db($database_canalbd, $connexion) or die ("problème dans selection base");
// definir la requête
$query_Recordset1="SELECT * FROM projets1, reporting_mensuel WHERE projets1.Num_projet=reporting_mensuel.Num_projet ORDER BY Nom_du_projet AND Mois ASC";
// excecution de la requête
$Recordset1=mysql_db_query ($database_canalbd,$query_Recordset1) or die("Erreur dans la requête");
$row_Recordset1=mysql_fetch_assoc($Recordset1);// ici on rapatrie toutes les lignes de la base
// dans un tableau row_Recordset1
?>
<body bgcolor="#CCCCCC" background="">
<table width="67%" border="1" align="center" bgcolor="#CCCCCC">
<tr>
<td height="23">
<div align="center"><font color="#CC0000"><strong>CONSULTATION DES PROJETS</strong></font></div></td>
</tr>
</table>
<br>
<form name="form1" method="get" action="visu_base.php">
<table width="100%" border="1" align="center">
<tr bgcolor="#FF99FF">
<td width="8%"><div align="center">Id_Projet</div></td>
<td width="6%"><div align="center">Num Projet</div></td>
<td width="12%"><div align="center">Nom Projet</div></td>
<td width="15%"><div align="center">Description</div></td>
<td width="5%"><div align="center">Date</div></td>
<td width="16%"><div align="center">Reporting</div></td>
<td width="17%" bgcolor="#00FFFF"><div align="center">Modifier un projet</div></td>
</tr>
<tr bgcolor="#FF99FF">
<td colspan="6"> </td>
<td bgcolor="#00FFFF"><div align="center">
<input name="modif" type="checkbox" value="">
</div></td>
<tr bgcolor="#FF99FF">
<td colspan="8"><input type="submit" name="Submit" value="Valider"> </td>
</tr>
<?php
$color="66CCFF";
while ($record = mysql_fetch_array($Recordset1))
{
//$tableau .= "<tr bgcolor=#".$color.">";
$tableau .= "<td width=\"6%\" >".$record['Id_projet']."</td>";
$tableau .= "<td width=\"5%\" >".$record['Num_projet']."</td>";
$tableau .= "<td width=\"26%\">".$record['Nom_du_Projet']."</td>";
$tableau .= "<td width=\"28%\">".$record['Description_du_Projet']."</td>";
$tableau .= "<td width=\"5%\">".$record['Mois']."</td>";
$tableau .= "<td width=\"28%\">".$record['Reporting']."</td>
<td input name="modif " type="checkbox" value =""</td></tr>";
}
echo $tableau;
?>
</table>
mysql_close($connexion);
?>
</table>
</form>
</body>
Ma question est la suivante : je veux que la case à cocher apparaisse sur toutes les lignes de mon tableau. J'ai bien essaye de mettre un input dans la boucle while mais ca foire quelque part. Est ce quelqu'un a une idee d'ou. Ce serait cool.


