This question already has answers here:
How can I access an array/object? (6 answers)
Closed 3 years ago.
i have a form like this
Macchina
Dispositivo
Descrizione
OK
NOK
PARZ
NA
Note
<?while($row = mysql_fetch_array($risultato)){
echo '<tr>
';
$count ++;
}?>
in the page "insert_controllo.php" if i print_r($_POST); i can see all the variable in the right way
<!-- POST: Array
(
[elements] => Array
(
[0] => Array
(
[macc] => 09
)
[1] => Array
(
[iddispsic] => 8
[macc] => 09
[descgen] => Comandi di emergenza
[chk1] => Array
(
[0] => OK
)
[note] =>
)......
i'm trying to retrieve the variable like this
for($i=0; $i<count($_POST['elements']); $i++){
$macc = $_POST['elements']['macc'];
$dispsic = $_POST['elements']['iddispsic'];
$descgen = $_POST['elements']['descgen'];
$chk1 = $_POST['elements']['chk1'];
$note = $_POST['elements']['note'];
echo $macc;
echo $dispsic;
echo $descgen;
echo $chk1;
echo $note;
var_dump($macc);
}
}
but in the var_Dump i get only NULL value. i need to INSERT them in my DB table can someone help me? thanks a lot best regards
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)