checkboxes and php
| From: | Harpreet | Date: | Thu, 08 May 2003 17:46:05 +0000 |
| Subject: | checkboxes and php | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-19809@lists.php.net to get a copy of this message | ||
I have checkboxs in a form for deletion
<input type=checkbox name="materialid<? echo
$row["material_id"];?>">
The above code create a checkbox for each row in the table.
I would like to delete multiple records using the above.
if i check 3 checkboxes for deletion and use
matid1=$HTTP_POST_VARS["materialid$matid"]; to find out if the checkbox is
checked. It works for the checkboxes that are checked but gives me an error
for the unchecked checkboxes.
Erro message:
Notice: Undefined index: materialid1020 in e:\..scripts\asset_delete2.php on
line 17
Notice: Undefined index: materialid1030 in e:\..scripts\asset_delete2.php on
line 17
and so on.
How can i skip the ones i dont check at all or skip the error message frm
showing. I dont care about the ones i dont check in the previous form.
Thanks,