Hi all,
I am looking for a way to batch update checkbox fields values in Mysql
database. I have a repeat region with checkboxes and am trying to update checkbox fields in MySQL database.
Something like Update command in ASP/Vbscript.
I have tried:
<?php
$ParamID = "1";
if (isset($HTTP_GET_VARS['checkbox'])) {
$ParamID = (get_magic_quotes_gpc()) ? $HTTP_GET_VARS['checkbox'] :
addslashes($HTTP_GET_VARS['checkbox']);
}
$result=mysql_query("UPDATE tbl_model_name SET fld_select = 1 WHERE ID =
$ParamPicID")
or die ("Invalid Query");
//header ("Location: test_selected.php");
?>
First i am not sure if the code is 100% correct.
2nd which i am pretty sure it seems like the checkbox values are not being passed from the previous page.
How do i pass or force to pass the checkbox values in the repeated region to make this code work?
I thank you in advance.
Best Regards
Khna