In PHP,how to create a second selection box with values base

i have to create a project in which there are two selection boxes First one is Skill_ctegory and takes values from the database dynamiclly(Scripting Laguages,Other Languages,Database,Personal SKills).And in Second selection box the valuse would also be displayed dynamically based on Values Selectd in Skill_category the First Selection Box. The values in second seletion box have relation …

via PHP Website Development » Search Results » ajax:

In PHP,how to create a second selection box with values base

i have to create a project in which there are two selection boxes First one is Skill_ctegory and takes values from the database dynamiclly(Scripting Laguages,Other Languages,Database,Personal SKills).
And in Second selection box the valuse would also be displayed dynamically based on Values Selectd in Skill_category the First Selection Box. The values in second seletion box have relation with Values in first Seletion box in database.eg(PHP,ASP,JavaScript are related to Scripting Language. and so on.)
I have created two tables :-
Table 1.
silll_category
id category
1 Scripting Laguages
2 Other Languages
3 Database
4 Personal SKills

TABLE 2
Skills
id cat_id Skill
1 1 PHP 2 1 ASP
3 1 Javascript
4 2 C
5 2 C++ 6 2 Java
7 3 MySql.
I will be thankfull to him/her if anybody could provide me solution Please provide some code or link where i can learn this
…………………………………..

I would go with an Ajax approach, as in, when the first select box value has been changed, a second one is loaded in via Ajax from a PHP page that Ajax request processed.
jQuery is great and there’s a great page on the jQuery site about the Ajax features in it.
…………………………………..

Alternative approach (always based on jQuery): put all of the possible options in the second select, separated into optgroups. When an option is selected in the first element apply display: none to all of the second element’s optgroups – except the one corresponding to the selected option (or hide() all of them and then show() the right one).

For more info: In PHP,how to create a second selection box with values base

PHP Website Development » Search Results » ajax

In PHP,how to create a second selection box with values base

Share this post:

Related Posts

Leave a Comment