Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4082902
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:14:42+00:00 2026-05-20T18:14:42+00:00

I have a 10 checkboxes, when i want to delete the appropriate record I

  • 0

I have a 10 checkboxes, when i want to delete the appropriate record I use to select one or more checkbox. All the checkbox nams are array. I’m properly getting the values from the html page to jquery function. After that i pushed all the checked boxes into the array created in the jQuery function. But i’m not able to sent the values from this jquery function to the ajax php function. May be the way i’m trying will be wrong. Please check out my code below.

function BulkDelete()// jQuery Function
{
    var Selected = new Array();
    jQuery("input[name='chec[]']:checked").each(function(){
        Selected.push(jQuery(this).val());
    });

    jQuery.ajax({
        url:"<?php echo admin_url( 'admin-ajax.php' ); ?>",
        type:"POST",
        data:"action=doctor_management_add_dept&id="+ Selected +"&task=bulkdelete",
        success:function(data){
            jQuery("#msg").html("<div id='message'>"+data+"</div>");
        }
    });               
}

function doctor_management_add_dept() // PHP function
{
    if($_POST['task']=="bulkdelete") {
        $ars[] = $_POST['id'];
        echo count($ars);
    }
}

I’m not getting any error. But the same time it’s always returning 1.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:14:43+00:00Added an answer on May 20, 2026 at 6:14 pm

    You may want to serialize your form data, then pass a whole one to your PHP script. In this case, you’ll be able to tell how many rows affected.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want have this ability to select multiple items with checkboxes and delete them
I have a table with checkboxes and I want to do the check all
I have two CheckBoxes and a TextBox. I want to TextBox to have IsEnabled=False
I want to submit a form that have many checkboxes with different values, using
I have 11 different checkboxes in my JFrame and want to be able to
I have a set of checkboxes and have disabled few which I want to
i have a form with some checkboxes on it i want to save those
I have created a gridview with a column of checkboxes. I want the user
I am working on zend. I have a form with some checkboxes. I want
I have datagridview with checkbox column, but I want, that some of the columns

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.