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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:21:01+00:00 2026-05-19T11:21:01+00:00

i have this scenario in my program, i’m printing a list of check boxes

  • 0

i have this scenario in my program, i’m printing a list of check boxes to my main page using below codes

<form action="two.php" method="post">
    <div id="option_box" style="width: 250px; height: 400px; overflow: scroll;">
            <?php
            $sql = "SELECT * FROM gene_names ORDER BY name";
            $result = $db->query($sql);
            $counter = 0;
            echo "<table border=\"0\">";
            while ($row = $result->fetch()) {
                $output[] = "<tr>"; 
                $output[] = "<td>"; 
                $output[] = "<input type=\"checkbox\" value=\"".$row['name']."\" name=\"things[]\" id=\"ran\"/>";   
                $output[] = " ";     
                $output[] = $row['name'];
                                $output[] = "</td>";  
                $output[] = "</tr>";    
                $counter++;
            }
            echo join('',$output);
            echo "</table>";
        ?>
    </div>
    <input type="submit" value="See Interactions" name="see" id="see"/>
 </form>

after that i’m using the below code to get the process done using jquery ajax

        $('#see').click(function(eve){
                eve.preventDefault();
                $.post('two.php', function(data) {
                        $('#results_of_interactions').html(data);
                });
    });

but i need to get the selected check box values inside my two.php(the files handling the processes of the above form) file in order to execute a sql query, but when i use this jquery approach the check box variables are not available at my two.php file, so my query is not properly executed and i can’t get the results, how can i correct this issue?please suggest some thing to do, a modification to this or another approach?

regards,
Rangana

  • 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-19T11:21:02+00:00Added an answer on May 19, 2026 at 11:21 am

    That’s because you have to manually prepare the data and send it along with your post request, it does not submit the form, it submits whatever you manually tell it to submit to two.php

    $('#see').click(function(eve){
        eve.preventDefault();
    
        //serialize form data to be sent with request
        var data = $('form').serialize();
    
        //send request with 'data'
        $.post('two.php', data, function(data) {
            $('#results_of_interactions').html(data);
        },'json');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this scenario where I would like to redirect my domains using the
So I have this scenario <div id=editor contenteditable=true> <div id=list>Hello</div> </div> I want to
You have all met this scenario. I am using a new algorithm for the
I came across this scenario. We have a class lets say Main having a
I have this scenario well, i'll let the model explain. public class ScheduleMonthlyPerDayModel {
I have this scenario. I want group on Country and Category. A store can
In my app, I have this scenario where I need to post an object
Imagine this scenario: You have a desktop and a laptop. The desktop has a
Consider this scenario. I have my own website, that I use as my identifier,
Consider this scenario. I have an object, lets call it.... Foo. Foo raises a

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.