<form action="" method="post">
<div class="second" style="margin-top:3px;margin-left:10px;font-size:100%">Add to</div>
<?php $new2=array();$new2=getlist();
foreach($new2 as $value)
{
echo'<input type="radio" id="qwerty" name="qwerty" value="'.$value.'" onclick="theLast()" />';
echo"$value";echo"<br>";}?>
<hr>
<button type="button" id="add2" class="new" onclick="theFinal()" >Create new list</button>
</form>
</div>
only first button is checked if i use
if (document.getElementById('qwerty').checked) {
how to check if other radio buttons are checked?