This script handles the approval of a user request for admin rights by updating the value of admin
column in users database.
More...
Functions | |
terminateApproveAdminWithError ($errorParam) | |
Variables | |
if(isset($error)) | try |
This script handles the approval of a user request for admin rights by updating the value of admin
column in users database.
Connects to the database and updates the admin
column value for the record of user, whose id is provided as a parameter of GET request. In case of success, redirects back to the page displaying all the user requests for admin rights. Terminates in case of connection- or update- error and redirects to the main page with an error context info as a parameter of the redirecting GET request.
terminateApproveAdminWithError | ( | $errorParam | ) |
Redirects to the index page with an error parameter.
string | $errorParam | The error parameter to append to the URL. |
Handle errors during the SQL execution by redirecting with an error message.
if (isset( $error)) try |
Check if there is an error, and terminate with an appropriate error message.