I created a table that is the summary of all my previous calculations and in this table I created a field where I placed a radial input to be able to select one of the calculated options. I need to identify which of the inputs was clicked, using the id, to proceed with the calculations. I'm using the PHP language.
Table:
<table class="table table-bordered">
<caption> Calculation </caption>
<thead>
<tr>
<th class="text-center">Cam number</th>
<th class="text-center">Space between cam</th>
<th class="text-center">FOV</th>
<th class="text-center">Overlap</th>
<th class="text-center">Height</th>
<th class="text-center">Pixels</th>
<th class="text-center">Selected</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center"><?php echo"$ncam" ?></td>
<td class="text-center"><?php echo"$dist mm" ?></td>
<td class="text-center"><?php echo"$fov mm" ?></td>
<td class="text-center"><?php echo"$ov mm" ?></td>
<td class="text-center"><?php echo"$alt mm" ?></td>
<td class="text-center"><?php echo"$sensor" ?></td>
<td class="text-center"><input type="radio" name="row-3" id="l1" data-col="1"></td>
</tr>
<tr>
<td class="text-center"><?php echo"$ncam1" ?></td>
<td class="text-center"><?php echo"$dist1 mm" ?></td>
<td class="text-center"><?php echo"$fov1 mm" ?></td>
<td class="text-center"><?php echo"$ov1 mm" ?></td>
<td class="text-center"><?php echo"$alt1 mm" ?></td>
<td class="text-center"><?php echo"$sensor" ?></td>
<td class="text-center"><input type="radio" id="l2" ></td>
</tr>
</tbody>
</table>
Then the idea was to select one or the other option and the calculations to be "automatic."
Thank you.
I made the change here: Script test using radio imput
Here the script works, but putting it in my document stops working, I do not understand why.
At this point I'm trying to pass the radial input variable to a variable in PHP and I'm having an error. At this point I do not know where this error might come from, as I'm passing the variable correctly:
$escolha = $_POST['radio'];
I do not know if the problem is due to having two forms on the same page, I just have to solve this problem to finish. Thanks