Hi, any help here would be great, so thanks in advance.
I have a php page talking to a mysql db, the db is populating 2 dropdowns one called department and one called user.
Both of these work independantly of each other.
What I am trying to do is when a client selects a department from the department dropdown the user dropdown will only display users from the specified department dropdown. I know that the mysql tables are fine, because it works great if you hardcode the department details.
the hardcoded statement for the user is:
SELECT FIRST_NAME,LAST_NAME,EMP_ID,DEPARTMENT.DEPARTMENT_ID,DEPARTMENT.DEPARTMENT_NAME FROM END_USER, DEPARTMENT WHERE END_USER.DEPARTMENT_ID=DEPARTMENT.DEPARTMENT_ID AND DEPARTMENT_NAME='SALES';
what I want to happen is subsitute the DEPARTMENT_NAME with the selection chosen from the DEPARTMENT dropdown, but I am having touble with this, as I believe that I need to post the result of the dropdown to the same form, then post the user,etc after. Is this possible.
I hope you can understand my point
thanks again
Matt Palmer