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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:48:14+00:00 2026-06-16T13:48:14+00:00

I have an issue that i need to learn how to solve! I’m making

  • 0

I have an issue that i need to learn how to solve! I’m making a submission form which consists of some select tags drop menus! so all of these drop menus are getting the data from the database i did that but the issue is that i need when i select something from Drop menu#1 i make a query and choose the matching data from the database and post them to Drop menu#2 ! so here is my code :-

<?php
echo "Choose your Source :<select name='source' value='Source'>
                      <option> </otpion>";
$sql = "SELECT City_name FROM city";
$info = mysql_query($sql);

while ($row = mysql_fetch_array($info)) {
    echo "<option > '" . @$row[0] . "'</option>";
}

echo "</select>";
echo "Choose your Destination :<select name='destination' value='Destination'>
                            <option> </otpion>";
echo @$source = $_POST['source'];
$sql = "SELECT Destination FROM Schedule  WHERE Source ='" . @$source . "'";
$info = mysql_query($sql);

while (@$row = mysql_fetch_array($info)) {
    echo "<option selected='selected'>'" . @$row['0'] . "'</option>";
}

echo "</select><br />";
?>

so now all i want to know, how can i get values from the database into “destination” drop menu when i select a value from “source” drop menu without refreshing the page nor clicking any buttons! thanks in advance .

  • 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-16T13:48:15+00:00Added an answer on June 16, 2026 at 1:48 pm

    That will require client-side scripting, like JavaScript. It appears you may be wanting to use AJAX, which would leverage JavaScript and allow you to make a call to your PHP file(s) on the server (and ultimately you database) without causing the page to refresh.

    If you aren’t familiar with AJAX, I suggest you do some research. You’re best bet would be to use a JavaScript library with AJAX functions already available – like jQuery: http://api.jquery.com/jQuery.ajax/

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

Sidebar

Related Questions

We have an issue where we need to modify keys for users that are
So here's my issue. I have an image that I need to shrink. The
So I have an issue that I'm not 100% sure on how to solve.
I have issue that is reproduced on g++. VC++ doesn't meet any problems. So
I have an issue that (I think) might have to do with scope, but
I have an issue that is driving me nuts and hoping someone can help.
I have an issue that seems like very flaky behavour, is this a problem
I have an issue that looks like a race condition with a webview callback
I have an issue that when I leave the android device idle for a
I have an issue that I'm basically baffled by. To start off, I have

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.