I\'m borrowing/adapting this simple html/javascript form set up to put some data in the database. The original code uses text fields in the form, but I\'m using radio button
If want to use pure javascript you have to use..
document.querySelector('input[name=radio_btn_name]');
but it need updated browser. Old browsers may result incorrect.
To overcome this issue, javascript library is to use (library will handle the issue). For this use the following..
$('input[name=radio_btn_name]:checked').val();