I'm using MySQL to display data on a web page - fitting about 10
records of data per screen - I'm including a checkbox with each record
so that I can check it and when the submit button is clicked the
called .php script will delete those records that are checked.
I'm creating the records from the table with the checkboxes ok (I
think):
<INPUT TYPE='checkbox'
NAME='frm_chk_d elete[$php_delete_cou nter]'>Delete
I use a php counter var to give each checkbox record item a unique
NAME and this seems to work OK - producing
frm_chk_delete[0]
frm_chk_delete[1]
etc.
The problem I'm having is the POST called script - I don't seem to be
detecting enabled checkboxes to delete them:
$php_mem_name = Trim(StrToLower ($php_name));
$php_SQL = "SELECT * FROM basics WHERE member_name =
'".$php_mem_nam e."'";
$php_resultID = mysql_query($ph p_SQL, $php_linkID);
$php_delete_cou nter = 0;
while ($php_row = mysql_fetch_obj ect($php_result ID))
{
if ($frm_chk_delet e[$php_delete_cou nter] == 'on')
{
$php_SQL = "DELETE FROM basics WHERE member_name =
'".$php_mem_nam e."'";
$php_resultID = mysql_query($ph p_SQL, $php_linkID);
}
$php_delete_cou nter++;
}
Can anyone see what I'm doing wrong or that I'm not understanding
about how to do this task?
Thanks...