Hello coders,
I'm trying to get form values from dynamic form (screenshot:
When the user clicks submit, I want to get the textfield value and the value of the checkbox right next to each other like:
Stage1 - 1 (checked)
Stage2 - 0 (unchecked)
So far, I have the code to get the textfields values but not the checkbox values next to each other:
I know that's some bad coding practice but I was wondering how can I achieve what I've stated with neat coding. I know there's a way and any help is appreciated.
Thanks in advance.
I'm trying to get form values from dynamic form (screenshot:
When the user clicks submit, I want to get the textfield value and the value of the checkbox right next to each other like:
Stage1 - 1 (checked)
Stage2 - 0 (unchecked)
So far, I have the code to get the textfields values but not the checkbox values next to each other:
Code:
while (list ($key,$status) = @each ($_POST['stage'])){
//echo "$val,";
while (list ($key,$status1) = @each ($_POST['stage_status'])){
echo "$status<br>";
echo "$status1<br>";
}
}
I know that's some bad coding practice but I was wondering how can I achieve what I've stated with neat coding. I know there's a way and any help is appreciated.
Thanks in advance.