•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 397,786 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,385 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 4713 | Replies: 10
•
•
Join Date: Dec 2006
Posts: 34
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
I've tried it mate didn't quite work but some thing did work here it is
hi buddy
The mistake in ur code i think is this
<TD ALIGN=CENTER ><input type="checkbox" name="<?=$row[id]?>" id="<?=$row[id]?>" value="<?=$row[id]?>"/></TD>
Give the name as this: name="<?='checkme[]';?>" where checkme[] is the nameof the checkbox.Do not hv to assign value in the name parameter
catch the value of checkbox as $checklist = $_POST["checkme"];
Then loop it through......
for($i=0; $i<count($checklist); $i++)
{
echo "print";
$remove = $checklist[$i];
$query=mysql_query("DELETE FROM materialmaster WHERE material_code='$remove'");// Notice that i am deleting using the checkbox var $remove
}
That's it. make these changes......sure it will work.gudluck
Last edited by php_coder : Dec 18th, 2006 at 5:35 am.
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- MySQL Checkbox Multiple data Delete? (PHP)
- html checkboxes... (PHP)
- Event Handlers for buttons created in ItemDataBound (ASP.NET)
- How to get value of selected dynamic checkboxes? (ASP.NET)
Other Threads in the PHP Forum
- Previous Thread: validating CSV before saving in MYSQL
- Next Thread: Loop Problem,plz help



Threaded Mode