This script handles reflecting in the database the fact that the user has requested for the admin rights.
More...
This script handles reflecting in the database the fact that the user has requested for the admin rights.
Connects to the database. Checks if there exists a record in 'users' table with id equal to the one set in $_SESSION['user_id']. If true, updates the value of 'admin_requested' column to 'true' and redirects back user profile page. Terminates and redirects to the main page in case of error with error context provided as a parameter of the redirecting GET request.