I have a foreach
statement that echos radio buttons.
All those radio buttons have same name
.
When I want to get the clicked ones, I use $_POST['radio_name']
But I got an error (it can't find the radio name)
This my code :
<form method="post">
<div class="repas-inside-bloc breakfast-bloc" id="brkID">
<?php
foreach($breakfast_array as $brk){
echo '<label for="'.$brk['id_plat'].'" class="plan-meal-box">'.$brk['titre_plat'].'</label><input name="brk_check" type="radio" id="'.$brk['id_plat'].'" value="'.$brk['titre_plat'].'">';
}
?>
</div>
How to get values of every radio button clicked ? $_POST['brk_check']
doesn't work