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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:02:28+00:00 2026-05-11T07:02:28+00:00

I have two drop down menus on my website. Technologies used are Javascipt ,

  • 0

I have two drop down menus on my website. Technologies used are Javascipt , php , mysql.

City : [        ]  Area : [        ] 

TODO: When user selects city I want to query database for areas in city and dynamically populate the area drop down menu.

When user selects area I want to query database again for results that belong to that perticular area and city.

Somthing like this(step by step).

------------------------1 City:[Choose City] ------------------------2 City :[New York] ------------------------3 City :[New York]  Area : [Choose Area] ------------------------4 City :[New York]  Area : [Times Square]     ------------------------4  10 Results Found for New York/Times Square: 1 . Result1 . 2 . Result2 ... .. . 

Here is database schema:

CREATE DATABASE `db_results` ;  CREATE TABLE `tbl_results`(     `result_id` INT NOT NULL AUTO_INCREMENT,     `result_title` VARCHAR(20),     `result_content` TEXT,     `result_category` INT,     `result_city` INT,     `result_area` INT,     PRIMARY KEY(`result_id`), );   CREATE TABLE `tbl_area`(     `area_id` INT NOT NULL AUTO_INCREMENT,     `area_name` VARCHAR(50),     `area_city` INT,     PRIMARY KEY(`area_id`) );  CREATE TABLE `tbl_cities`(     `city_id` INT NOT NULL AUTO_INCREMENT,     `city_name` VARCHAR(40),     PRIMARY KEY(`city_id`) ); 

I have created script to dynamically flood the menu but when I query database using dynamically generated menu it gives error that ‘area’ is undefined index.

Here is link to the files: FILES

  • 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. 2026-05-11T07:02:29+00:00Added an answer on May 11, 2026 at 7:02 am

    Not much information to go on, but from your php error notice, you are trying to access an index in your results array / database table that does not exist (from your tbl_area definition – and assuming your query returns all fields – area_id, area_name and area_city are all valid indecies, but ‘area’ is not).

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

Sidebar

Related Questions

I have a user control in a master page with two drop down lists.
I have a form with two drop down menus and I want the selectable
I have two drop down menus, one of which I am trying to replace
Simple ASP.NET application. I have two drop-down controls. On the first-drop down I have
I have a form with two text boxes, one select drop down and one
I have a page with several multiselect drop-down menus. Each menu has a general
I have used a jQuery script and some php code to generate two select
I have two Drop Down Lists, the second ones are based off which one
I have a drop down menu, with two options: <select name="chs" value="" id =
EDIT: The drop down menus have the following listed in them: Typing Course Daily

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.