Hi!
I am working on a time sheet application and I have used a piece of code that Jane provided to make drop down values stored in a table display dependent on a value in a field in the user table. There are only 2 choices in the user table, salary and hourly and if the user is salary then the drop down contains all of the entries, and if the user is hourly then the choices contain only those records with a type of hourly. Here is the code you provided:
if (@$_SESSION["varWageType"]!="salary")
$_SESSION["wage_class"] = " salary_class!='salary' ";
else
$_SESSION["wage_class"] = " 1=1 "
This works very well but now we want to change it so that there are 4 wage types, hourly, salary, corporate and all. I want to be able to make the drop down dependent on the wage type (salary, hourly, corporate) and I also want to display the records that are of the wage type of "all" for everyone. So I have 3 different choices:
hourly and all
salary and all
corporate and all
Any help on the logic and code to make this work will be greatly appreciated.
Thanks