Well, just add a line with the links and make them link like so:
domain.com/update.php?sect=af
then, do your query... and of course, default to AF
<?php
if(empty($_GET['sect']) || !isset($_GET['sect']))
{
$_GET['sect'] == 'AF';
}
switch(strtoupper($_GET['sect']))
{
case 'AF':
$sect = 1;
break;
case 'GM':
$sect = 2;
break;
case 'NS':
$sect=3;
break;
case 'TZ':
$sect=4;
break;
default:
$sect=1;
break;
}
$sections = array(
1=>array('A', 'B', 'C', 'D', 'E', 'F'),
2=>array('G', 'H', 'I', 'J', 'K', 'L', 'M'),
3=>array('N', 'O', 'P', 'Q', 'R', 'S'),
4=>array('T', 'U', 'V', 'W', 'X', 'Y', 'Z')
);
$query = "SELECT * FROM `table` WHERE (";
foreach($sections[$sect] as $let)
{
$query .= "lastName LIKE '$let%',";
}
$query = substr($query, 0, -1); // removes last comma
$query .= ") ORDER BY lastName ASC";
// and so on...
?>
To select each item to update, just make the checkboxes an array:
<input type="checkbox" name="edit[]" value="mysql_row_id">
Then, just make sure that you add those IDs as hidden values in the next form, and then do a simple update:
UPDATE table SET col=value, col=val, col=val, col=val WHERE id=$id1 OR id=$id2
Or, you can run two separate update queries, and just call the second ID... but I'm thinking what I have above would work.
~Brett