Case à cocher PHP
Résolu
Mabroukkkkk
-
kilian Messages postés 8732 Date d'inscription Statut Modérateur Dernière intervention -
kilian Messages postés 8732 Date d'inscription Statut Modérateur Dernière intervention -
Bonjour,
merci d'abord pour vos aides monsieur
j'ai essayé d'executer ce code mais j'arrive pas à l'executer:
<form action="<? $PHP_SELF;?>" method="post" name="form1">
<input name="check[]" type="checkbox" value="1">
<input name="check[]" type="checkbox" value="2">
<?php
foreach((array)$check as $elem)
{
$res=$res+$elem;
}
echo $res;
?>
</form>
message d'ereur:
Notice: Undefined variable: check in c:\program files\easyphp1-8\www\des\pagesweb\untitled-1.php on line 14
Notice: Undefined variable: res in c:\program files\easyphp1-8\www\des\pagesweb\untitled-1.php on line 18
merci d'abord pour vos aides monsieur
j'ai essayé d'executer ce code mais j'arrive pas à l'executer:
<form action="<? $PHP_SELF;?>" method="post" name="form1">
<input name="check[]" type="checkbox" value="1">
<input name="check[]" type="checkbox" value="2">
<?php
foreach((array)$check as $elem)
{
$res=$res+$elem;
}
echo $res;
?>
</form>
message d'ereur:
Notice: Undefined variable: check in c:\program files\easyphp1-8\www\des\pagesweb\untitled-1.php on line 14
Notice: Undefined variable: res in c:\program files\easyphp1-8\www\des\pagesweb\untitled-1.php on line 18
Par ça: