Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
|
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 17th, 2005, 06:27 PM
Registered User
 
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default php dynamic combo boxes

The problem that i have is as below:
On a php webpage, i have two combo drop down boxes. One is for State and another is for region. The State combo box has the following 5 values:

Virginia
California
Florida
NewYork
Kansas

The region combo box has the following 5 values:

East
West
North
South
Others

The relation between the two combo boxes is as below:
Virginia - East
California - West
Florida - South
NewYork - North
Kansas - Others

Now when the php page loads the first time assume that the selected value displayed in the combo box 1 is Florida whose region combo box has a value South.

Now when the user selects Kansas as the State in the 1st combo box i shud be able to display Others in the region combo box. Also i shud be able to display a blank text box adjacent to this regiion combo box where user can enter some value (eg: mid west, mid east....any value.).

Again lets say the user now selects California in the 1st combo box, this time we shud display West as the value in the 2nd combo box and shud hide the text box that was displayed for Others during the previous selection.

All this shud be dynamic without any hard coding. You can hardcode the state and region value only for the 1st display when the page loads for the first time. All others will be dynamic.

Please send me the source code for this asap.
Thanks in Advance






Similar Threads
Thread Thread Starter Forum Replies Last Post
3 combo boxes ttkt Beginning PHP 0 July 2nd, 2005 02:20 PM
Combo boxes socoolbrewster Access 1 March 4th, 2004 09:28 AM
combo boxes damnnono_86 Access 2 October 15th, 2003 09:00 PM
Combo Boxes Louisa Beginning VB 6 2 September 10th, 2003 09:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.