Jump to content

PHP menu Drop down


allworknoplay

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.