Jump to content

Recommended Posts

I have seen numerous topics outlining cascading multiple dropdown boxes, however, I'm having trouble coming up with a solution to a similar, but different, problem.

 

I'm trying to come up with a better way for a selection of a visitor's best 5 vacation states. Without a chance of duplicate selections.

 

 

I see 2 ways to handle this:

 

1. Use php/html to populate the dropdowns from the MySQL db table 'states' (5 times). Currently the way I have it set up.

 

2. Use AJAX to remove the selections in the previous dropdowns (preferred). This eliminates duplicate selections.

The first dropdown would populate from a MySQL db table 'states'.

The second dropdown would populate from the db and eliminate the first selection.

The third dropdown would popluate from the db and eliminated the first and second selections.

And so on.....

 

The problem is that the second dropdown is dependent on the selection of the first dropdown.

Has anyone come across a "Top 10" list that works the same way?

Or should I just verify selections in #1 against each other to prevent duplicate selections?

Edited by seabee1982
Link to comment
https://forums.phpfreaks.com/topic/273504-multiple-dropdown-boxes/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.