PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 15th, 2011, 03:53 PM
jvance38 jvance38 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2011
Posts: 2 jvance38 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 56 m 50 sec
Reputation Power: 0
Populating multiple dropdown lists with data from mysql database

I realize that there are multiple posts in both the PHP and JavaScript Forums but they are very old so I thought I'd start from scratch.

So I have a database with multiple fields and I want to have a form that will have multiple dropdown lists that update dynamically when a choice is made from the initial list.

If my form has 3 dropdown fields, County, District and School. When a user selects the County, the District field will populate from the same database. Once the District field is selected, then the School field will be populated from the same database.

After all 3 fields are selected, I would like the form to search database and display the complete record with all of the fields printed out.

I'm trying to avoid using JavaScript and would like to know if anyone can guide me as to the clearest way to do this using PHP. I appreciate any snippet of code i can get. Thank you.

Reply With Quote
  #2  
Old April 16th, 2011, 12:30 AM
mecanicu mecanicu is offline
anonymous
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Posts: 244 mecanicu User rank is Private First Class (20 - 50 Reputation Level)mecanicu User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 12 h 20 m 17 sec
Reputation Power: 9
You can't avoid JavaScript because the user selection must be determined with JavaScript

Reply With Quote
  #3  
Old December 3rd, 2012, 02:42 AM
leonvictor2012 leonvictor2012 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 12 leonvictor2012 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 27 m 40 sec
Reputation Power: 0
PHP development applications

You have using the java script programming retrieving mysql database values in multiple dropdown list and related data will get displayed on the text boxes.

Reply With Quote
  #4  
Old December 3rd, 2012, 06:50 AM
Beve3rly Beve3rly is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 5 Beve3rly User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 34 sec
Reputation Power: 0
I would like the form to search database and display the complete record with all of the fields printed out.


Reply With Quote
  #5  
Old December 5th, 2012, 01:40 AM
corbidougu corbidougu is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 5 corbidougu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 m 53 sec
Reputation Power: 0
the user selection must be determined with JavaScript

Reply With Quote
  #6  
Old June 18th, 2013, 06:55 AM
alexdisuza alexdisuza is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2013
Posts: 1 alexdisuza User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 21 m 4 sec
Reputation Power: 0
You can avoid JavaScript.
On user selection take that value in variable and fire the query using that variable and populate next drop down.
Suppose you select country="India"
then fire query such as
select district from tablename where country="India";
and populate next drop down with result of this query.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingPHP Development > Populating multiple dropdown lists with data from mysql database


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap