Sure:
//Dynamic page with checkboxes:
$display_this = "
<form method=\"post\" action=\"step4.php\"><table>";
while($row = mysql_fetch_array($result)) {
$Name = $row['Name'];
$Age = $row['Age'];
$itemID = $row['id'];
blah blah...
display_this .= "
//separate table cells with hidden fields in
<tr><td><input type=\"hidden\" name=\"Name\" value=\"$Name\"><p>$Name</p></td></tr>
<tr><td><input type=\"hidden\" name=\"Name\" value=\"$Name\"><p>$Name</p></td></tr>
<tr><td><input type=\"checkbox\" name=\"Accept[$Name]\" value=\"$itemID\"></td></tr>
//etc etc
}
display_this .= "
</table></form>";
//step4.php (processing script:
if (isset($addusers)) {
if(is_array($Accept)) {
$msg = "<p><b>These users now subscribed: </b></p>";
for($i=0; $i<=$teamID; $i++) {
$insertsql = "INSERT INTO $table_user (Name,Age)
VALUES('$Name','$Address')";
$result = mysql_query($insertsql, $connection) or die(mysql_error());
}
}
else {
$msg = "<p>You didn't select anyone!</p>";
}
All this does is insert the last result,
regardless of the number of results I
check.
Thanks for the offer of help.
Russ