How an i get unchecked Values from my ckeckbox?
I have 3 Radiobuttons. When i click the first all checkboxes must be checked, the second radiobutton unchecked all checkboxes. The third radiobutton gives the possibility to check some checkboxes, and all checkboxes who was not cheked i want to send the value to the DB from 0 to 1 with an UPDATE Query. The radiobuttons works fine, but i don't get the values of the unchecked checkboxes to send it to my update query. Here the code of the first page with the formelements:
//That is only a short version of my Select who works correct
$abfrageT = "SELECT DISTINCT id_dexpd, acores.code_regate, detail_exp_devise.num_expertise ...
FROM acores, infos_bureau, demande_expertise_dev, detail_exp_devise, agents
WHERE acores.id_acores = '$id_acores'
AND demande_expertise_dev.date_dem_exp = '$expdev' ...";
$ergebnisT = mysql_query($abfrageT) or die("Query failed with error: ".mysql_error());
while($abfrageT = mysql_fetch_assoc($ergebnisT))
{
$newcup = $abfrageT['coupure'];
$newpd = $abfrageT['code_devise'];
$newns = $abfrageT['num_serie'];
$IDX = $abfrageT['id_dexpd'];
$NumExp = $abfrageT['num_expertise'];
echo"<tr>";
// Here are the ckeckboxes:
echo"<td bgcolor=".$bgcolor." id='myGlob2' align='center'><input type='checkbox' name='check1' value='$abfrageT[id_dexpd]' /></td>";
echo"<td bgcolor=".$bgcolor." id='myGlob2'> ". $newcup ." ". $newpd ."</td>";
echo"<td bgcolor=".$bgcolor." id='myGlob2' > ". $newns ."</td>";
echo"<td > </td>";
echo'</tr>';
And here the Code of the second page with my update:
$NumExp = $_GET['NumExp'];
$IDX = $_GET['check1'];
$QryUpAnswerIdn = "UPDATE detail_exp_devise SET detail_exp_devise.exp_val = 1
WHERE detail_exp_devise.num_expertise = $NumExp
AND id_dexpd = $IDX";
$ResUpAnswerIdn = mysql_query($QryUpAnswerIdn) or die("Query failed with error: " . mysql_error());
if ($IDX) {
$QryUpAnswerId = "UPDATE detail_exp_devise SET detail_exp_devise.exp_val = 0
WHERE detail_exp_devise.num_expertise = $NumExp
AND id_dexpd = $IDX";
$ResUpAnswerId = mysql_query($QryUpAnswerId) or die("Query failed with error: " . mysql_error());
}
Here a picture:
Anybodu an idea?
THX in advance