|
|
#1 |
![]() Join Date: Nov 2006
Location: Tamworth,UK
Posts: 571
|
Hi Guys
I am looking at some advise on the best practice for a MySQL database and PHP dynamic drop down. I have used the tutorial on the forum as a bases for my drop downs done by DJ but I am a little stuck. Ok I have a database where the client wants a drop down for the service levels its members have for example. Company A has services levels A,B,C,D Company B has service levels A,C,D,Z So when he selects A in drop down 1 it will show in Drop down 2 all the companies with A as a service standard and then list them. PHP Code:
Can anyone advise the best way to do this? I am a little rusty with PHP and MySQL search stings so forgive me...
__________________
Regards Cocoonfxmedia http://www.cocoonfxmedia.co.uk/seo.html http://twitter.com/cocoonfxmedia http://facebook.com/cocoonfxmedialtd |
|
|
|
|
|
#2 |
![]() Join Date: Nov 2006
Location: Tamworth,UK
Posts: 571
|
Hi Guys
Sort of working this out but stuck on how to remove commas from the service level and then show the results for the companies in the second drop down. I.e campany A has service standard A,B Company B has C I need the first drop down to show company A for both the option A and B. PHP Code:
__________________
Regards Cocoonfxmedia http://www.cocoonfxmedia.co.uk/seo.html http://twitter.com/cocoonfxmedia http://facebook.com/cocoonfxmedialtd |
|
|
|
|
|
#3 |
![]() Join Date: Nov 2006
Location: Tamworth,UK
Posts: 571
|
Hi Guys
still struggling with this... PHP Code:
Hope this makes sense? help!
__________________
Regards Cocoonfxmedia http://www.cocoonfxmedia.co.uk/seo.html http://twitter.com/cocoonfxmedia http://facebook.com/cocoonfxmedialtd |
|
|
|
|
|
#4 |
![]() Join Date: Nov 2006
Location: Tamworth,UK
Posts: 571
|
Anyone? really stumped...
__________________
Regards Cocoonfxmedia http://www.cocoonfxmedia.co.uk/seo.html http://twitter.com/cocoonfxmedia http://facebook.com/cocoonfxmedialtd |
|
|
|
|
|
#5 |
![]() ![]() Join Date: Aug 2005
Location: Bali
Posts: 8,394
|
im struggling to understand what you want , but im blaming a cold. can you try again and explain your problem as it stands?
__________________
If you're happy and you know it shake your meds! different style links examples Bali Villas Flights to Bali |
|
|
|
|
|
#6 |
![]() ![]() Join Date: Aug 2005
Location: Bali
Posts: 8,394
|
ah re read it after coffee, where do you want the detail to show?
it looks like the second form option needs to be a link. or a hover tool tip? or am I delirious?
__________________
If you're happy and you know it shake your meds! different style links examples Bali Villas Flights to Bali |
|
|
|
|
|
#7 |
![]() Join Date: Nov 2006
Location: Tamworth,UK
Posts: 571
|
No its probably the way I have described it. I will make it easier to understand
Table: Company A - ServiceLevels = A,B,C,D,M Company B - ServiceLevels = B,C,D The drop downs need to filter the company name by individual Service level. So in drop down 1 if I select B the in drop down 2 both companies will show. If I select A then only Company A should show. When the user in drop down 2 selects Company A the details need to echo below the drop down showing the full address of Company A. This is the part I am struggling with.
__________________
Regards Cocoonfxmedia http://www.cocoonfxmedia.co.uk/seo.html http://twitter.com/cocoonfxmedia http://facebook.com/cocoonfxmedialtd |
|
|
|
|
|
#8 |
![]() ![]() Join Date: Aug 2005
Location: Bali
Posts: 8,394
|
ok i see i think , i will have to think on . you close the loop inside the form so that is basically where it collapses .
__________________
If you're happy and you know it shake your meds! different style links examples Bali Villas Flights to Bali |
|
|
|
|
|
#9 |
![]() Join Date: Nov 2006
Location: Tamworth,UK
Posts: 571
|
ok possibly an array is needed some where... crazy thing is I can do this with a search box. not a drop down ;o)
__________________
Regards Cocoonfxmedia http://www.cocoonfxmedia.co.uk/seo.html http://twitter.com/cocoonfxmedia http://facebook.com/cocoonfxmedialtd |
|
|
|
|
|
#10 |
![]() ![]() Join Date: Aug 2005
Location: Bali
Posts: 8,394
|
yes i was thinking array also
__________________
If you're happy and you know it shake your meds! different style links examples Bali Villas Flights to Bali |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|