Text boxes for specific users


#1

Hi! I’m new to PHP. I made a website with a registration system and was able to log in successfully, but now I am trying to make a system with users with specific ranks can edit text boxes on the website when they’re logged in.
For example, when the administrator is logged on the website, he is able to edit any title (h1) or paragraph that is visible on the website. Is this possible using HTML, CSS, and PHP?


#2

Yes, that is possible.


#3

May you please give me a hint as to how I can achieve this?


#4

I’d look into using something like this
https://vitalets.github.io/x-editable/

Just optionally load it if the user is authenticated.

Remember to protect edit/save php routes so only authorized users can edit data