display data from selected dropdownlist. help please

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
iqa
Forum Newbie
Posts: 1
Joined: Mon Sep 14, 2009 10:12 pm

display data from selected dropdownlist. help please

Post by iqa »

Hello everyone!
i'm new here and looking some advices for my php project
I have problem to get data and display in the page from the selected value in dropdownlist.
The situasion is :
I had get employee num, value for dropdown using query from the employee table.
Now i want to display other data from the same table such as employee name, position and ect. in the page depend on selected value in drodown.
hope someone could give advice because i also newbie in php.
tq very much
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Re: display data from selected dropdownlist. help please

Post by CoderGoblin »

What you are actually doing is a basic form function unless you actually wish to automate the process so the user doesn't have to click a "submit" button. In this case you need to look at AJAX. The thread Dynamic/Chained Selects using Ajax Prototype/JQuery may help with AJAX although it is quite old. Just bear in mind you are simply getting and displaying data rather than another combo box.

The main thing here is to break up the task and learn/understand each component. As far as I can see learn:

1) Basic form handling
2) Database queries

>> Combine the two to produce the necessary output

3) AJAX processing - if required
Post Reply