Dynamic Dropdown Menu?

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
adilmarwat2004
Forum Commoner
Posts: 44
Joined: Fri Sep 04, 2009 11:28 pm

Dynamic Dropdown Menu?

Post by adilmarwat2004 »

I have database in mysql name "prj"
contains 1 table name "inf".

which have 2 fields named "student" & "teacher".

I want to create two drop down menu.

1 for : Select Category [Student] or [Teacher].
when i select student it automatically selects the field of student from database and display in the 2nd dropdown menu.


How can i do this , please help me in this regard.
User avatar
Mirge
Forum Contributor
Posts: 298
Joined: Thu Sep 03, 2009 11:39 pm

Re: Dynamic Dropdown Menu?

Post by Mirge »

What have you tried so far? I assume you're wanting to utilize AJAX so that it's able to do that without a page refresh. I would highly recommend using jQuery for it.
adilmarwat2004
Forum Commoner
Posts: 44
Joined: Fri Sep 04, 2009 11:28 pm

Re: Dynamic Dropdown Menu?

Post by adilmarwat2004 »

How it can be possible with jquery. i have no experience of jquery.
User avatar
Mirge
Forum Contributor
Posts: 298
Joined: Thu Sep 03, 2009 11:39 pm

Re: Dynamic Dropdown Menu?

Post by Mirge »

Well I'm not going to write the script for you. If you're wanting to use Ajax, I highly recommend jQuery... see the link in my previous post for documentation & downloads.
pbs
Forum Contributor
Posts: 230
Joined: Fri Nov 07, 2008 5:31 am
Location: Nashik, India
Contact:

Re: Dynamic Dropdown Menu?

Post by pbs »

You can follow my "PBS" signature URL for multi level menu usinp PHP / MYSQL / JAVASCRIPT. You may find it helpfull
Post Reply