How are you getting the data out of the database? Server-side script?
Assuming you do your database query via php from a MySQL DB, you might want to consider doing something like...
$cust_query = "SELECT status FROM custDB WHERE cust_name = '$cust'";
$cust_result = mysql_query($cust_query);
while ($row = mysql_fetch_assoc($cust_result)) {
$cust_status = $row['status'];
}
Now, this is really a simple bit, because it assumes you just want one customer's status. If you had several customers, you might go with...
$cust_query = "SELECT cust_name, status FROM custDB ORDER cust_name";
$cust_result = mysql_query($cust_query);
while ($row = mysql_fetch_assoc($cust_result)) {
$cust_status[$row['cust_name'] = $row['status'];
}
This would give you an associative array of all of your customers and their status, which, printed out, would look like:
[Jones] => 'Active',
[Smith] => 'Inactive'
etc...
Having that, you would simply make your output. Since it's a boolean (they can either be active or inactive), I'd reccomend using a checkbox instead of radio. This is the basic HTML:
<table>
<tr><td>Jones</td><tr><input type="checkbox" checked="checked" value="active" /></td></tr>
<tr><td>Smith</td><tr><input type="checkbox" value="active" /></td></tr>
</table>
And to have that work out for your database results, you could go with...
echo <<<EOT
<table id="cust_status">
<tr><th>Customer Name</th><th>Status</th></tr>
EOT;
while($row = mysql_fetch_assoc($cust_results)) {
$status = ($row['status'] == 'active') ? 'checked="checked"' : "";
$cust_name = $row['cust_name'];
echo <<<EOT
<tr><td>$cust_name</td><tr><input type="checkbox" $status value="active" /></td></tr>
EOT;
}
echo "</table>";
That last bit avoids the need to move the results into an array and just echos them straight out. Once you've got that loaded, you can use jquery to run some ajax on the table if you want to run updates. So maybe you change the statuses to reflect new activity, you check the box, a text field appears for the reason, and then you hit "update" and it passes the values to a server-side script that stores the new info without having to submit a for for the entire customer sheet.