Problème en php

Résolu/Fermé
Utilisateur anonyme - 12 juin 2008 à 16:12
 Utilisateur anonyme - 13 juin 2008 à 11:12
Bonjour,
je voudrai savoir comment faire pour recupérer les valeurs des composants de mon tableaux.
voici mon code:

<html>
<head>
<title>titre</title>
</head>
<body>


<form action="testjeff.php" method="post" name="Numero"><br>
cocher 1 ou pls chiffre<br>

<input type="checkbox" name="composant[]" value="1" id="choix1">1</option><br>
<input type="checkbox" name="composant[]" value="2" id ="choix2">2</option><br>
<input type="checkbox" name="composant[]" value="3" id = "choix3">3</option><br>
<input type="checkbox" name="composant[]" value="4" id = "choix4">4</option><br>
<input type="submit" name="Submit" value="confimer">

</form>

</body>
</html>
<?

$nb_checkbox=count($_POST[composant]);
print ('Nombre de checkbox :'.$nb_checkbox);
echo '<br><br><pre>';
//Print(count($_POST));
//Print_r('insert into TOTO('.$_POST.')');
print_r($_POST);
echo '</pre>';

for ($x=0;$x<$nb_checkbox;$x++)
{$value=$_POST["value"];
Print_r('insert into TOTO('.composant[$x].')');

echo'<br>';
}
?>


pourriez-vous m'indiquer ce que je dois faire?
merci
A voir également:

1 réponse

Utilisateur anonyme
13 juin 2008 à 11:12
resolu tout seul comme dab
0