Validate radio buttons with php using the ID not the NAME:
I have 3 button radios but the name of the radios I bring from the bd (I bring the name), until then I have no problems, the question is that since I do not have a name that I wrote manually I can not pick them up by post (if I print the varibles that arrived by post I receive the value without problems). the case is that if I do it with getElementId () how would that value change to php (I tried it with ajax but it did not work). I would greatly appreciate this help.
index.php
$consulta_tabla_estudiante=mysqli_query($conexion,$profesores);
while ($registroAsistencia =mysqli_fetch_row($consulta_tabla_estudiante))
{
?>
<tr>
<td><?php echo $registroAsistencia[0]; ?></td>
<td><?php echo $registroAsistencia[1]; ?></td>
<td><?php echo $registroAsistencia[2]; ?></td>
<td><label><input type='radio' name='<?php echo $registroAsistencia[1]; ?>' id="presente" value='presente'> Presente</label></td>
<td><label><input type='radio' name='<?php echo $registroAsistencia[1]; ?>' id="ausente" value='ausente'> Ausente</label></td>