Well, you are very kind to keep trying to help me here and I thank you very much.
I have tried several additional options but still can not get things to work. Perhaps it will help to put all the code again as I now have it.
<?php
$hostname = "localhost";
$database = "mydb";
$username = "me";
$password = "";
$dbcnx = mysql_connect($hostname, $username, $password) or die(mysql_error());
mysql_select_db($database, $dbcnx);
$query = "SELECT cityname, taxrate FROM stw_city";
$list = mysql_query($query, $dbcnx) or die(mysql_error());
$row = mysql_fetch_assoc($list);
$editFormAction = $HTTP_SERVER_VARS['PHP_SELF'];
if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
$editFormAction .= "?" . $HTTP_SERVER_VARS['QUERY_STRING'];
}
$error = "";
if ((isset($HTTP_POST_VARS["MM_insert"])) && ($HTTP_POST_VARS["MM_insert"] == "form1") && ($error =="")) {
if ((isset($HTTP_POST_VARS[($taxoption[$i])])) && ($HTTP_POST_VARS[($taxoption[$i])] == "")) {$error .= "You must select at least one option<br>";}
}
for($i=0; $i<100; $i++)
{
if(isset($taxoption[$i]))
$query = "INSERT INTO stw_taxoptions VALUES (0,'$mtax[$i]','$mcity[$i]')";
$list = mysql_query($query, $dbcnx) or die(mysql_error());
}
$cityname = " ";
$taxrate = " ";
$numofrows = " " ;
$taxoption[$i] = " ";
$mtax[$i] = " ";
$mcity[$i] = " ";
?>
<html>
<head>
<title></title>
<style>
.row0 {background-color:#d8d8d8}
}
.row1 {background-color:#f2f2f2}
}
</style>
</head>
<body>
<center>
<TABLE width="200" BORDER="0" cellpadding="2" cellspacing="2">
<form name="form1" method="POST" action="<?php echo $editFormAction; ?>">
<TR bgcolor="#c1c1c1">
<TD width="20" align="center"><B>Tax</B></TD>
<TD width="20" align="center"><B>Select</B></TD>
<TD width="50" align="center"><B>City</B></TD>
</TR>
<?php
$i=0;
do { $i++;
?>
<TR CLASS="row<?=($i&1)?>">
<TD width="20" align="right">
<?php echo $row['taxrate'];?>
</TD>
<TD align="center>
<input name="taxoption[]" type="checkbox" value="<?php echo '1'?>">
<input type="hidden" name="mtax[]" value="<?php echo $row["taxrate"]?>">
<input type="hidden" name="mcity[]" value="<?php echo $row["cityname"]?>">
</TD>
<TD width="50" align="left"><?php echo $row['cityname']; ?></TD>
</TR>
<?php } while ($row = mysql_fetch_assoc($list))
?>
<input type="hidden" name="numofcheck" value="<?php echo $i?>">
?>
<tr>
<td>
<br>
<input type="hidden" name="MM_insert" value="form1">
<input name="submit" type="submit" value="Process Configuration">
</form>
</td>
</tr>
</TABLE>
</center>
</body>
</html>
<?php
?>
Maybe I need to have Page 1 (Selection Page1, then Page 2 (Preview Page + final update of Table 2) if all is correct to process.
Then Page 3 can have totally separate to access the updated config info in Table 2.
I have tried so many things but the checkboxes will not appear again like with my original demo.
My version # is now "s" (i.e., a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,yz). Time to start a new file name.
ARRRRGGGHHHHHHHH :mad::mad: