on my first page i have a script that generates checkboxes with the info from a table(db), every row gets one checkbox. Every row also has an unique id(0,1,2,3,...) and this relates to the name of the checkbox
example :
<input type'checkbox' name='check[1]' value='on'>
if that box is checked that row 1 should be deleted.
I did this :
<?
$sql = " SELECT max(id) AS top FROM gastenboek " ;
$output = mysql_query($sql) ;
$high = mysql_fetch_array($output) ;
$kwerie = " DELETE FROM gastenboek WHERE id='x' " ;
for($i=0;$i<=$high[top];$i++){
if($check[$i]=="on"){
$kwerie=$kwerie . "AND id='$i'" ;
$del = "1" ;
}
mysql_query($kwerie) or die("error ici") ;
}
?>
but it doesn't work =(
its like the $check[1] isn't the same as check[$i] when $i=1
according to me thats strange
can anyone help ?
thx