Question: 110 marlol below is a portion of a PHP document that shows the names of the useis who are curently logged into the web-besed application.
110 marlol below is a portion of a PHP document that shows the names of the useis who are curently logged into the web-besed application. When a urer logs in, their username is sayed in the "name" field of the CurrUsers table, and then deleted when they log out. The tirnestamp of when they logged in is saved in the "login_dt" field. Your takk is to list each of the logged in users (ordered by when the logged in) encapsulated in a sp> tag. This feature should only be available for the currently logged in user if they are an administrator of the web-based application. If the current user is not an administrator then the output soys "unauthorized". A session variable ( "authority") is set when a user logs in. The value of this session variable is either "adrin" if the current user has administrator access or "user" otherwise, Write the PHP code that will accomplish these tasks using proper and efficient programming techniques so that you are connecting to and using the database only when you needed. current_users-php Include(" db, phi"): F. Ir thuert your code here and at the approprlate place ulthla the hin code belon chead? ctittescurent Userse/titie). Sflhead? chody? /body? of thini
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
