Button status to database

Hello, good day, i have a project and i don't know how to do it.
My Materials are
esp
arduibo mega
and buttons.

The fields of my "room" table are
Room_number
Request

Now, if i push the buttons, i wan't to know if the pressed button is in Room1 and if i push another button, it means it is in room number 2 and i want to show in the Request field the status of the room, example if its requesting or available.

Please teach me how to make it possible. A very big thank you in advance.

LesProux:
Please teach me how to make it possible.

Please clearly formulate your problems and do some research.
What does a database have to do with it?

Pieter