+ 1

problem with the radio button

I have 3 radio buttons and a button to send. I need that by clicking on the button the data is sent to the database. this is my code code.html <td><fieldset><label><input type='radio' id='presente' name='".$registroEstudiantes['id_estudiante']."' values='presente'>Presente</form></label></fieldset></td> <td><fieldset><label><input type='radio' id='ausente' name='".$registroEstudiantes['id_estudiante']."' values='ausente'>Ausente</form></label></fieldset></td> <td><fieldset><label><input type='radio' id='excusa' name='".$registroEstudiantes['id_estudiante']."' values='excusa'>Excusa</form></label></fieldset></td> echo "<td><input type='button' id='1' value='guardar' name='guardar' method='POST'></td> "; I have the connection to the database in conexion.php.. I need help with the button to save. I tried with the onClick and it does not work out, if someone here can give me help I would appreciate it.

29th May 2019, 8:11 PM
Alvaro Blanco
Alvaro Blanco - avatar
2 ответов
0
I'm not familiar with PHP but you need to write some code that finds the result of the selected radio button and passes it to the database when you click your input button, the button will only pass the information you tell it to, it won't know to look for the active/selected radio button unless you code it in.
30th May 2019, 7:39 AM
Rincewind
Rincewind - avatar
0
That's where I'm stuck. because I can not find a way to do it
30th May 2019, 3:21 PM
Alvaro Blanco
Alvaro Blanco - avatar