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

  • Home
  • SEARCH
  • 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 7773933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:15:06+00:00 2026-06-01T17:15:06+00:00

I have a checkbox list of items. I need to update my database to

  • 0

I have a checkbox list of items. I need to update my database to which items were selected. The list of items is displayed dynamically.

The problem is how can i pass list of ID’s through ajax?

here is my ajax code:

function update(form,div,PhpFile,type)
{
if (request)
    {
        var obj = document.getElementById(divId);
        request.open("POST",PhpFile);
        //setting the header
        request.setRequestHeader('Content-Type','application/x-www-form-urlencoded');

        request.onreadystatechange = function()
        {   
            if (request.readyState == 4 &&
                    request.status == 200){
                obj.innerHTML =request.responseText;
            }
        }

        if(type=='news')
            request.send(?????);

    }
}

I’ve marked with ??? the space that I don’t know what to put there.

Of course I can update each of the check boxes individually but it is a very bad solution.

  • 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-06-01T17:15:07+00:00Added an answer on June 1, 2026 at 5:15 pm

    PHP 5 can decode JSON and in JS you will need to use a library. This seems to be a popular answer.

    Serializing to JSON in jQuery

    And JSON in PHP
    http://www.php.net/manual/en/function.json-decode.php

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

Sidebar

Related Questions

In ASP.NET, I have collected a list of selected items from a checkbox in
I have a list of items which each list having a checkbox like this:
I have a asp.net checkbox list that is dynamically generated and I need to
I have a checkbox list which is filled with entries from my database on
i have checkbox list printed in one column, but i need it to print
I have the following fiddle1 http://jsfiddle.net/y6tCt/35/ . I need to build the checkbox list
I have a list of items displayed as a ListBox. <ListView ItemsSource={Binding ListOfSomeItems}> <ListView.View>
I have an Access application in which I need to do a 'mass-update'. I
I have a template that displays the list of items. It has one checkbox
I have the following checkboxlist. I need to uncheck rest of list items when

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.