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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:52:07+00:00 2026-06-12T10:52:07+00:00

Okay, so I have 2 select boxes on my page, the first with the

  • 0

Okay, so I have 2 select boxes on my page, the first with the name “select” with the following options hard-coded:

<select name="select" id="Testid">
        <option value="Misc">Misc...</option>
        <option value="Stunt">Stunt</option>
        <option value="deathmatches">Deathmatches</option>
        <option value="Car"> Car </option>
        <option value="Races">Races </option>
    </select>

The second select box however (named “deleteTp”) I want to populate with a mysql table depending on the selection of the first select box. Each option value has a specific table in my database with the same name as the value.

I know how to populate the second select box with the database table, however I’m not sure how to do this dynamically depending on the users choice.

Please note I only know basic javascript.

And if you’re wondering why I am trying to do this, it’s because the second selectbox will be posted to an external page to delete the rows from the populated table.

Thank you for your time.

  • 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-12T10:52:10+00:00Added an answer on June 12, 2026 at 10:52 am
    $.ajax({
      type: 'post',
      url: "ajax.php."
      data: { id:'your id here' } //your id is your select box selected id.
    }).done(function() { 
    
    });
    

    on php side :

    $id = $_REQUEST['id']; 
    $json = array();
    $sql = mysql_query("select * from yourdb where id = $id");
    while ($row = mysql_fetch_assoc($sql)) {
        $json[] = $row;
    }
    echo json_encode($json);
    

    ajax ref : http://api.jquery.com/jQuery.ajax/

    json ref: http://en.wikipedia.org/wiki/JSON

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

Sidebar

Related Questions

Okay so i have this code: if (isset($_GET['book'])) { $query= SELECT book_id, title, authors.`author`
Okay - I have a dilemma. So far my script converts page titles into
Okay so here is my database: I have a page on my .net form
Okay I have table: ID Name Description Picture 1 Alex Alex desc.. 2 2
Okay, say i have a table with the field code. The query select code
I have a dialog box with two radio select options 'exist' and 'upload' and
I have the following tables: Item (Table) no name price description Item-custom (Table) userid
I have a select tag and when there is a value in it it
Okay so I want to have an image that I select through CSS to
Okay, right now I have a form that contains this select list: <%=Html.LabelFor(x =>

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.