Ok I was working on this yesterday, and I couldn't get it.
I have a php file called search.php and a file called searchResults.php, if a user wants to search for an employeeName/EmployeeID/team/department/manager (in a DB) specifically they will use the search.php page and then click submit and show the results in the searchResults.php file...If the user is loged in as a manager he can use search.php file to do the same thing but the manager pages also have a link "My Employees" which is linked to searchResults.php and displays all the employees in the same page "searchResults.php". my question is, How can i modify the "searchResult.php" file to "know" whether the user is coming from "search.php" where the user clicked submit or if the manager clicked on the link?

my DB: Has An Employee Table with (ID, Fname, Lname, ManagerID, Team, Department, Contact]

and if you have some spare time...anyone...can you please show me how to search for an employee if the user enter both a first name and last name in the text box with a space...i.e) [John Smith] I would post my code but I think it would just confuse you....there is too much stuff on it.

Hi

you must store the user details in a session. create an object called user and store the access id (aid) to manager if managaer and employee if employee.....

make the user login before using the search page....

this way you will know that the user is manager for the entire session

You need to store the user details in the session so that u can tell if the user is manager for the entire period.

make the user login before using the search page

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.