enregistrement complet d'un checkbox
Bonjour,
Je construis une table avec le résultat d’un select. Pour chaque ligne il y a une checkBox.
Je veux récupérer l’enregistrement complet de checkbox coché.
Merci
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| <form method="POST" action="cli_com.php">
$sql1 = mysql_query("SELECT * FROM ac_client");
echo "<table width=100% cellspacing=\"0\" cellpadding=\"0\">";
echo "<tr class=\"blueRow\">";
echo " <td>Select</td>";
echo " <td>First Name</td>";
echo " <td>Sur Name</td>";
echo " <td>Address</td>";
echo " <td>Mail</td>";
echo " <td>Mobile Phone</td>";
echo " <td>Client Id</td>";
echo "</tr>";
while($result1 = mysql_fetch_array($sql1)) {
echo "<tr id=\"r\$$i\">";
//echo "<td width=50%>Client</td>";
echo " <td> <input type=checkbox name=chk[".$i."] value = ".$result1["cli_id"] ." </td>";
echo " <td> " .$result1["cli_prenom"] . " </td>";
echo " <td> " .$result1["cli_nom"] . " </td>";
echo " <td> " .$result1["cli_add"] . " </td>";
echo " <td> " .$result1["cli_mail_ad"] . " </td>";
echo " <td> " .$result1["cli_portable"] . "</td>";
echo " <td> " .$result1["cli_id"] . "</td></tr>";
$i++;
}
echo "</table>";
?>
<input type="submit" name="manip" value="ajouter" >
<input type="submit" name="manip" value="choisir">
</form>
</head>
</html> |