je veut récupérer les données d'une liste des boutons radios qui ont comme nom une variable php <?php echo $row_rec_list_pro['libelle_prod']; ?> c'est la liste des produits : c.à.d chaque série de cases est une liée a une produits qui est récupérer de la BD;
<?php require_once('Connections/maconn.php'); ?>
<?php
mysql_select_db($database_maconn, $maconn);
$query_rec_list_pro = "SELECT * FROM direction D, region R, etat E, produits P,table_appro TP where E.id_etat=TP.id_etat and P.id_prod=TP.id_prod and R.id_reg=D.id_reg and D.id_dir=TP.id_dir";
$rec_list_pro = mysql_query($query_rec_list_pro, $maconn) or die(mysql_error());
$row_rec_list_pro = mysql_fetch_assoc($rec_list_pro);
$totalRows_rec_list_pro = mysql_num_rows($rec_list_pro);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd]">
<html xmlns="[http://www.w3.org/1999/xhtml]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<p> </p>
<table width="570" border="1">
<tr>
<td width="176" rowspan="2">libelle_prod</td>
</tr>
<tr>
<td width="123">Faible</td>
<td width="131">Moyen</td>
<td width="112">Fort</td>
</tr>
<?php do { ?>
<tr>
<td width="176"><?php echo $row_rec_list_pro['libelle_prod']; ?></td>
<td><input name="<?php echo $row_rec_list_pro['libelle_prod']; ?>" type="radio" id="faible" value="faible" /></td>
<td><input name="<?php echo $row_rec_list_pro['libelle_prod']; ?>" type="radio" id="moyen" value="moyen" /></td>
<td><input name="<?php echo $row_rec_list_pro['libelle_prod']; ?>" type="radio" id="fort" value="fort" /></td>
<td><input type="submit" value="Ok"/></td>
</tr>
<?php } while ($row_rec_list_pro = mysql_fetch_assoc($rec_list_pro)); ?>
</table>
<p>
</p>
</form>
<p> </p>
</body>
</html>
<?php
mysql_free_result($rec_list_pro);
?>
EDIT : Ajout des balises de code.
Explications disponibles ici :
https://codes-sources.commentcamarche.net/faq/10686-le-nouveau-codes-sources-comment-ca-marche#balises-code
Afficher la suite