First use the userId as the value for each checkbox
<input type="checkbox" name="snames[]" value="<?php echo $row1['userId']; ?>" />
Also your group radio buttons should all have he same name else multiple buttons can be selected. And use the group name to as the value
<input type="radio" name="group" value="<?php echo $group2; ?>" /> <?php echo $group2; ?>
<p>
<input type="radio" name="group" value="<?php echo $group3; ?>" /> <?php echo $group3; ?>
<p>
<input type="radio" name="group" value="<?php echo $group4; ?>" /> <?php echo $group4; ?>
<p>
<input type="radio" name="group" value="<?php echo $group5; ?>" /> <?php echo $group5; ?>
<p>
<input type="radio" name="group" value="<?php echo $group6; ?>" /> <?php echo $group6; ?>
<p>
<input type="radio" name="group" value="" /> Deactivate student.
<p>
Then loop through the $POST['snames'] array updating the data for each loop
if ($_POST['group']) {
$userGroup = $_POST['group'];
foreach($_POST['snames'] as $v) {
mysql_query("UPDATE users SET userGroup='$userGroup' WHERE recid='$recid' AND userId='$v'");
}
}
Note that
$userGroup = $_POST['group1'];
$userGroup = $_POST['group2'];
$userGroup = $_POST['group3'];
$userGroup = $_POST['group4'];
$userGroup = $_POST['group5'];
$userGroup = $_POST['group6'];
$userGroup = $_POST['group7'];
sets "$userGroup" to the value of "$_POST['group7']" so you would not be able to set any user to the value of $_POST['group4'], for example.
$snames = $_POST['snames[]']
is incorect syntax
$snames = $_POST['snames']
is how you would assign the $_POST['snames'] array to $snames.