jQuery Delete Multiple Rows using checkbox PHP with MySQL

jQuery Delete Multiple Rows using checkbox PHP with MySQL

jQuery Delete Multiple Rows using checkbox PHP with MySQL

In this Post We Will Explain About is jQuery Delete Multiple Rows using checkbox PHP with MySQL With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to how to delete multiple rows using checkbox in javascriptExample

In this post we will show you Best way to implement how to delete multiple rows using checkbox in jquery, hear for delete multiple records using ajax in phpwith Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

File Structure


phases 1: Create simple Database Table

`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`students_name` varchar(255) NOT NULL COMMENT 'students name',
`students_salary` double NOT NULL COMMENT 'students salary',
`students_age` int(11) NOT NULL COMMENT 'students age',

phases 2: Create simple Database Connection


phases 3: Include External Files


phases 4: Display students Records with all Checkbox and Delete


<div class="container">
<h2>Example: </h2>
<table id="students_grid" class="table table-condensed table-hover table-striped bootgrid-table" width="80%" cellspacing="0">
<th>Students Name</th>

<tr id="">
<td><input type="checkbox" class="stud_checkbox" data-stud-id=""></td>

<div class="row">
<div class="col-md-2 well">
<span class="data_row_selected" id="get_chkbox">0 Selected</span>
<a id="delete_records" class="btn btn-primary pull-right">Delete</a>

phases 5: Select All HTML Checkbox using jQuery

$('#inp_select_all').on('click', function(e) {
if($(this).is(':checked',true)) {
$(".stud_checkbox").prop('checked', true);
else {

$("#get_chkbox").html($("input.stud_checkbox:checked").length+" Selected");

$(".stud_checkbox").on('click', function(e) {
$("#get_chkbox").html($("input.stud_checkbox:checked").length+" Selected");

phases 6: Delete All Selected rows with jQuery Ajax

javascript code – Ajax request to remove_pageactions.php

$('#delete_records').on('click', function(e) {
var students = [];
$(".stud_checkbox:checked").each(function() {
if(students.length 1?"these":"this")+" row?";
var checked = confirm(WRN_PROFILE_DELETE);
if(checked == true) {
var selected_values = students.join(",");
	type: "POST",
	url: "remove_pageactions.php",
	data: 'stud_id='+selected_values,
	success: function(response) {
	var stud_ids = response.split(",");
	for (var i=0; i < stud_ids.length; i++ ) 
	} } 
	}); } } 

phases 7: Delete Records from MySQL Database



I hope you have Got What is Delete Multiple Rows with Checkbox using jQuery, PHP & MySQL And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.

Related FAQ

Here are some more FAQ related to this Article:

  1.   Vue js Multiple Tag Input with Dynamic Autocomplete
  2.   how to delete Multiple Selected rows using checkbox in laravel
  3.   jQuery Ajax POST example with Laravel 5.7
  4.   WooCommerce Get Product Prices
  5.   Learn Laravel (Best Laravel Tutorials for Beginners)
  6.   jquery empty/null json object Example
  7.   AngularJS - update bind ng-model input value from Jquery Code
  8.   JavaScript Integrate CKEditor in Html Page
  9.   WordPress HTTP API Remote Requests with wp_remote_get()
  10.   ng-mousemove Event using Angular Example