skip to Main Content

can you edit people’s permission on PhpMyAdmin? like this guy can be a mod (Has more permissions) and this other guy cannot on the website by editing. Is it possible

2

Answers


  1. MySQL doesn’t know about mods. For almost all web apps, there’s just one MySQL “user” credential. The web app code uses that single credential for all its database work.

    It’s the web app using MySQL that knows about mods.

    You haven’t mentioned the web app you use. But, in general the answer to your question is “no.”

    Login or Signup to reply.
  2. Let’s consider this case by pseudo code

    Create a table users to keep records of users.

    create table user( username varchar(20), password varchar(20),isadmin int);
    

    In your isadmin field allow only two values 1 (admin) or 0 (normal user)

    now

    Set Session[admin]==isAdmin (0 or 1)

    Create a admin panel. Check if

    if(Session[admin]==1)
    {
    
    delete from users where id = id_passed_from_user
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search