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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:10:33+00:00 2026-06-09T10:10:33+00:00

I am trying to select Radio, check boxes and drop downs depending on the

  • 0

I am trying to select Radio, check boxes and drop downs depending on the data retrived from database. So far I have only tried the radio button but haven’t got any success, here is what i have.

edit_cc_form.php

<?php

include("../MySqlConnection.php"); 


        if(isset($_GET['edit']))

        {

            $id = $_GET['edit'];

            $query = "SELECT DesiredEffectiveDate,
                             NameofAssociation,
                             DBA,
                             TaxID,
                             StreetAddress,
                             City,
                             State,
                             Zip,   
                             AssociationContactName,    
                             Telephone,     
                             Email,     
                             CurrentEligibleMembers,    
                             PaymentMethods,    
                             LifeLockBasic,     
                             LifeLockCommandCenter,     
                             LifeLockUltimate,  
                             EsignatureTitle, 
                             Esignature,    
                             DateSigned,    
                             WritingProducer,   
                             WritingProducerCode 
                             FROM Association_Enrollment WHERE id = '$id'";

            $result = mysql_query($query);

            $row = mysql_fetch_row($result);  

            $DesiredEffectiveDate = $row[0];

            $NameofAssociation = $row[1];

            $DBA = $row[2];

            $TaxID = $row[3];

            $StreetAddress = $row[4];

            $City = $row[5];

            $State = $row[6];

            $Zip = $row[7];

            $AssociationContactName = $row[8];

            $Telephone = $row[9];

            $Email = $row[10];

            $CurrentEligibleMembers = $row[11];

            $PaymentMethods = $row[12];

            $LifeLockBasic = $row[13];

            $LifeLockCommandCenter = $row[14];

            $LifeLockUltimate = $row[15];

            $EsignatureTitle = $row[16];

            $Esignature = $row[17];

            $DateSigned = $row[18];


            $WritingProducer = $row[19];

            $WritingProducerCode = $row[20];


            $full = $DesiredEffectiveDate.":".$NameofAssociation.":".$DBA.":".$TaxID.":".$StreetAddress.":".$City.":".$State.":".$Zip.":".$AssociationContactName.":".$Telephone.":".$Email.":".$CurrentEligibleMembers.":".$PaymentMethods.":".$LifeLockBasic.":".$LifeLockCommandCenter.":".$LifeLockUltimate.":".$EsignatureTitle.":".$Esignature.":".$DateSigned.":".$WritingProducer.":".$WritingProducerCode.":".$id;

            echo $full;

        }

?>

Jquery Ajax That handles the data returned

    $('a.edit_cc_form').click(function(){


                                $.ajax({

                                    type: 'get',

                                    url: 'cc_form/edit_cc_form.php',

                                    data: 'ajax=1&edit=' + $(this).attr('id'),

                                    success: function(data){

                                            var temp = data.split(':');

                                             $('#DesiredEffectiveDate').val(temp[0]);

                                             $('#NameofAssociation').val(temp[1]);

                                             $('#DBA').val(temp[2]);

                                             $('#TaxID').val(temp[3]);

                                             $('#StreetAddress').val(temp[4]);

                                             $('#City').val(temp[5]);

                                             $('#State').val(temp[6]);

                                             $('#Zip').val(temp[7]);

                                             $('#AssociationContactName').val(temp[8]);

                                             $('#Telephone').val(temp[9]);

                                             $('#Email').val(temp[10]);

                                             $('#CurrentEligibleMembers').val(temp[11]);



                                             if(temp[12] == 'Deduction handled by Association')
                                                {

                                                    $("input[name='PaymentMethods1']:checked").val();

                                                }


                                            if(temp[12] == 'Direct Bill Members with Credit Card')
                                                {

                                                    $("input[name='PaymentMethods2']:checked").val();

                                                }


                                             $('#LifeLockBasic').val(temp[13]);

                                             $('#LifeLockCommandCenter').val(temp[14]);

                                             $('#LifeLockUltimate').val(temp[15]);

                                             $('#EsignatureTitle').val(temp[16]);

                                             $('#Esignature').val(temp[17]);

                                             $('#DateSigned').val(temp[18]);

                                             $('#WritingProducer').val(temp[19]);

                                             $('#WritingProducerCode').val(temp[20]);

                                             $('#update_cc').val(temp[21]);

                                    }

                                });


                    $("#cc_form").show();

                    $("#user_list_cc").hide();  


        }); // edit CC forms end

Part of the form that I am trying to select based on the data stored on temp[12] after parsing the result returned. Any Ideas on how to do this, any help is really appreciated.

<td class="section-sub-head">
                                                    <label>Payment Methods:</label>
                                                    <br /><br />

                                                    <input type="radio" name="PaymentMethods1" id="PaymentMethods"  value="Deduction handled by Association" style="width:20px !important;" class="required"/> Deduction handled by Association

                                     <br /> <br />      
                                                <input type="radio" name="PaymentMethods2" id="PaymentMethods"  value="Direct Bill Members with Credit Card"  style="width:20px !important;" class="required" /> Direct Bill Members with Credit Card      
                                                     <br />
                                                        <label for="PaymentMethods" class="error" generated="true"></label>
                                                        <br />
                                                </td>
  • 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-09T10:10:34+00:00Added an answer on June 9, 2026 at 10:10 am

    -> You need to list of things need to check.

    • First put alert in your success function and check it returned data successsfully which you want.

    • I checked your html format.It is totally wrong.Id is unique field and you used 2 times.And if payment methods are in group then name field in both radio button are same which is diffrent in your html like PaymentMethods1 and PaymentMethods2.need to correct this.

    • In jquery, $(“input[name=’PaymentMethods1′]:checked”).val();
      I don’t understand why you put this.it is fetching value and you don’t take any variable to take this value.

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

Sidebar

Related Questions

I am trying to convert select boxes to radio buttons on the fly using
I am trying to get the value from the radio boxes/button with php. The
I'm simply trying to check that one of the three radio boxes has been
In trying to select elements that have any attributes, the following throws a jQuery
When trying to select fields from a subquery if ANY of the subqueries do
I am trying to select three values from xml document. I want to get
I am trying to select only the topmost section H1s. In this fiddle ,
I am trying to select the last record from a table in MySQL using
I am trying to select an object from this array and print all of
I'm trying to select all dom elements that have id=mydiv but exclude the ones

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.