delete multiple rows using checkbox forms
Posted: Sun Dec 01, 2002 6:38 pm
can you delete multiple rows using checkbox forms?
If so how, help please Im new to PHP.
thanks
If so how, help please Im new to PHP.
thanks
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<form method="POST" ... >
<input type="checkbox" name="todeleteї]" value="45" />record id 45<br/>
<input type="checkbox" name="todeleteї]" value="46" />record id 46<br/>
<input type="checkbox" name="todeleteї]" value="50" />record id 50<br/>
<input type="checkbox" name="todeleteї]" value="55" />record id 55<br/>
<input type="checkbox" name="todeleteї]" value="78" />record id 78<br/>
<input type="submit" />
</form>Code: Select all
foreach($_POSTї'todelete'] as $id)
myDeleteRecordById($id); // what ever this function does