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
display data from selected dropdownlist. help please
Moderator: General Moderators
- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
Re: display data from selected dropdownlist. help please
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
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