Thanks guys,
Roger, I created the array as you suggested:
<input name="activate[]" type="checkbox" id="checkbox[]" value="<?php echo $row_Recordset1['id']; ?> ">
I am just confused where I should put the second part of your suggestion. I tried here without success:
<?php$activate = $_POST['activate'];
$query = "UPDATE reseller SET active='y' WHERE id IN ( ";
for($i=0;$i<count($activate);$i++){
$query .= "$activate[$i],";
}
while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$query = substr($query, 0, strlen($query)-1) . ")";
or is it supposed to go in here:
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE reseller SET active=%s WHERE id=%s",
GetSQLValueString(isset($_POST['checkbox[]']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString($_POST['hiddenField'], "int"));
mysql_select_db($database_clients, $clients);
$Result1 = mysql_query($updateSQL, $clients) or die(mysql_error());
$updateGoTo = "index.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
}
Thanks,
Mike