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 8566487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:39:56+00:00 2026-06-11T17:39:56+00:00

I have this form which i submit using ajax and jquery , well, i

  • 0

I have this form which i submit using ajax and jquery ,
well, i have this multiple checkbox from which i get some values.

Now i am doing an error here since the values of the checkbox are not being posted in the database..
Here is the html/php part :

  while($row = mysql_fetch_assoc( $result )) {
    echo '<input type="checkbox" value="'.$row['regione'].'" id="regioni_gestite_ag" name="regioni_gestite_ag[]">' . $row['regione'] . '<br>';
    }

This is how i get it with javascript:

var js_regioni_gestite_ag = $('input:checkbox[name=regioni_gestite_ag]:checked').val();

If i echo the value, i get undefined…
Why is it so?

  • 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-11T17:39:57+00:00Added an answer on June 11, 2026 at 5:39 pm

    Try this:

    var js_regioni_gestite_ag = [];//[name="regioni_gestite_ag[]"]
    if($('input[name="regioni_gestite_ag[]"][type=checkbox]:checked').length){
        // check if any checkboxes are checked
        $('input[name="regioni_gestite_ag[]"][type=checkbox]:checked').each(function(o){
            // get their values
            js_regioni_gestite_ag.push($(this).val());
        });
    }
    
    // clears all selected checkboxes
    function clearSelection() {
        $('input[name="regioni_gestite_ag[]"][type=checkbox]:checked').each(function(o){
            $(this).removeAttr('checked');
        });
    }
    

    Hope this helps.

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

Sidebar

Related Questions

I have inserted this form with multiple checkbox items which collects some values, What
I have this form that validates the fields on submit through ajax (using Codeigniter's
I have this form which allows the input of any product quantity from 1-10:
I have this input form which goes like this: <input type=checkbox name=vehicle value=Bike />
I'm using the jQuery validation plugin and the form uses ajax to submit the
I have a dynamically generated form that I would like to submit using Ajax.
I'm using jQuery UI dialog. I have a delete form as follows: @using (Ajax.BeginForm(DeleteUser,
When using jQuery 's ajax method to submit form data, what is the best
I have this form tag below where the form submits to itself which I
I have this simple form which shows a pop up calendar when clicked on

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.