/    Sign up×
Community /Pin to ProfileBookmark

Problem2 with combo box

I have 3 combo boxes which are related with each other and their data is taken from MySQL database. When selecting an option from the first combo, I want the second and third ones display only the data that are related with the one which has been selected in the first combo box.

Thanks in advance.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMay 15.2008 — Unless you want it to be a sequence of 3 separate form pages, you will need to use JavaScript with onchange events in the <select> tags. You can either pre-populate all the JS data from your database, or use an AJAX implementation to get the data from the server (via PHP script(s) that will query the D?.
Copy linkTweet thisAlerts:
@cs3mwMay 15.2008 — Have a look at this tutorial it really helped me out when I was doing this type of functionality!

http://www.dhtmlgoodies.com/index.html?whichScript=ajax_chained_select
×

Success!

Help @harevik85 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...