Jump to content

Recommended Posts

Hey guys, I've always wanted to know how to do this. It's a mixture of PHP and either AJAX or javascript, I'm hoping someone could help me with this.

 

Basically I have 2 drop down boxes. I don't believe this is a "parent/child" relationship.

 

Both dropdown boxes select names from the same table say: PEOPLE

 

If PEOPLE has: John, Jane, and David.

 

If I select the FIRST drop down box and choose John.

 

Then the second drop down box right below it, will only allow me to select Jane or David.

 

So basically, whatever I choose from the first drop down, shouldn't be available in the second drop down...

 

Could someone help me with this one?

Link to comment
https://forums.phpfreaks.com/topic/146146-php-menu-drop-down/
Share on other sites

After giving this more thought, it appears this is really a client side scripting issue.

 

The PHP is only used to generate the list.

 

But I would need some type of javascript code that would control both drop down menu's and not allow the second drop down to contain the selected item from the 1st drop down....

Link to comment
https://forums.phpfreaks.com/topic/146146-php-menu-drop-down/#findComment-767263
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.