Dynamic Combobox +php mysql

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vamsi_j
Forum Newbie
Posts: 5
Joined: Tue Jan 02, 2007 6:49 am

Dynamic Combobox +php mysql

Post by vamsi_j »

I need a dynamic combobox like double and triple combobox .The values will be stored in the database.

Please let me know how to do it,.

example

combobox Ex1 --> Ex3,Ex4
Combobox Ex2 -->Ex5,Ex6
Selecting Ex6 -->Ex7

How to fetch each element from the database.
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

A couple of questions...

Is the problem you do not know how to connect to a database, or you do not know how to do the combo boxes or both ?

If you need to connect to a database... MySQL Functions may be of use if you are using MySql. If using a different database you need to find the relevant information in the manual.

I take it the select boxes need to be chained.. i.e the result from select1 needs to set the select2 etc... If so the following may be of use...
Javascript and Dynamic Select Boxes a tutorial written some time ago. A different, more up to date method can be found at Dynamic/Chained Selects using Ajax with Prototype.
Post Reply