T
T
TechNOIR2018-01-29 23:05:16
PHP
TechNOIR, 2018-01-29 23:05:16

PHP. How to implement "admin mode" in a chat bot?

Good afternoon. I'm trying to implement "admin mode" in a chat bot.
The chat bot is implemented on the simplest php and js.
The scheme is something like this:
-First I log in with the bot (it asks for a password)
-And then IF the password is correct, then I enter the so-called admin mode. That is, the rest of the script, as it were, freezes, and I work inside this cycle, as it were, until I write Exit, for example.
I tried to experiment with do while, but somehow unsuccessfully.
Any ideas comrades?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
artshelom, 2018-01-29
@artshelom

Add rights.
If the user has rights, then allow access.
At you then the user will have:
login, the password, the rights.
Depending on the level of rights, the user will be granted or denied access.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question