It's a bit difficult to guess what you are trying to do, but it actually sounds a little like the post I've just made a few minutes ago "Form not posting to database".
My form is a series of checkboxes in a column that are cross referenced to radio buttons with predetermined values.

It's a bit difficult to guess what you are trying to do, but it actually sounds a little like the post I've just made a few minutes ago "Form not posting to database".
My form is a series of checkboxes in a column that are cross referenced to radio buttons with predetermined values.

Hi. I'm no expert here, and I need some help.
This form does not update the database. I know it is accessing the database because the checkbox and radio buttons variables are good, but there is no result posted.
Can anyone tell me what is wrong here.

[code=php]<?php
session_start();

// Place Session variable 'recid' into local variable
$recid = $_SESSION['recid'];
$username = $_SESSION['name'];
$school = $_SESSION['college'];
//Connect to the database
include_once "demo_conn.php";
// Query members data from the database and organise it for display
$sql = mysql_query("SELECT group1, group2, group3, group4, group5, group6 FROM members WHERE recid='$recid' LIMIT 1");
while($row = mysql_fetch_array($sql)){
$group1 = $row['group1'];
$group2 = $row['group2'];
$group3 = $row['group3'];
$group4 = $row['group4'];
$group5 = $row['group5'];
$group6 = $row['group6'];
}

// Process the form
if ($_POST['group']) {
$userGroup = $_POST['group'];

foreach($_POST['snames'] as $x) {
    mysql_query("UPDATE users SET userGroup='$userGroup' WHERE recid='$recid' AND userId='$x'");
}
echo 'Selected students have been updated to new groups.<br /><br />

To return to your editing page, click here';
exit();
} // close if posted

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Edit Your User Group Names Select students. Send students to ....