Table feeds a table which feeds a table

Codes here !

Moderators: macek, egami, gesf

sandsb
New php-forum User
New php-forum User
Posts: 1
Joined: Sun Oct 07, 2012 11:02 am

Table feeds a table which feeds a table

Postby sandsb » Sun Oct 07, 2012 11:12 am

I'm having trouble with a form that displays 3 drop down lists.

Dropdown #1: The user selects a value from a drop down list. The list is populated by a table.

Dropdown #2: The user selects a value from a drop down list that is populated based on his selection in Dropdown #1.

Dropdown #3: The user selects a value from a drop down list that is populated based on his selection in Dropdown #2.

Each of my tables will have a dozen or more possible value. Below is a more brief example:

Dropdown #1 asks you for gender and displays possible values from a table that includes only 2 option, male and female.

Dropdown #2 asks you for your favorite Olympic sport and the list displayed contains no sports that are male only.

Dropdown #3 asks you what sporting gear you need to buy used in the sport selected in drop down #2.

So if you picked female in #1, #2 would show you a list of female sports including synchronized swimming. Then #3 would show you things like bathing cap, nose plug etc.

Anybody have code that will do this?

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm

Re: Table feeds a table which feeds a table

Postby seandisanti » Thu Oct 11, 2012 8:45 am

Any time you're going to update the page based on real time input from the user, you're going to need javascript, whether it's jquery or ajax. Either will help you in this situation, but you're still going to have to either require javascript be enabled or create a non responsive page for the users that have javascript disabled.


Return to “mySQL & php coding”

Who is online

Users browsing this forum: No registered users and 3 guests