I have this code to populate rows of a table in a php form
$html = '<tr>';
$html .= '<td class="tg-yw4l"><input type="text" name="exam_date_input[]" value="' . $exam_date . '"></td>';
$html .= '<td class="tg-yw4l"><input type="text" name="exam_code_input[]" value="' . $exam_code . '"></td>';
$html .= '<td class="tg-yw4l"><input type="text" name="exam_title[]" value="' . $title . '"></td>';
$html .= '<td class="tg-yw4l"><input type="text" name="exam_time_input[]" value="' . $exam_time . '"></td>';
$html .= "<td class='tg-yw4l'><a href='javascript:void(0)' class='row_remove'> - </a></td>";
$html .= '<tr>';
die($html);
This is HTML is shown when I inspect the element
<input name="exam_date_input[]" value="01/03/2017" type="text">
Submitting the form should, in theory, add this array to the $POST array.
This isn't happening however.
Instead this code on my form action page $date = $_POST['exam_date_input']; gives the following notice:
Notice: Undefined index: exam_date_input
And there isn't an array of exam_date_input in the $POST array using var_dump($_POST);
die()command implies that this is the entirety of your HTML, which means there is no actual form. What are you even submitting?print_r($_POST);show you? There won't be a$_POST['exam_date_input']given those inputs.