E
E
error_notfound2021-09-03 22:52:36
Telegram
error_notfound, 2021-09-03 22:52:36

Callback_data How to give a response to a message and write the response to the database.Telegram bot PHP?

Good people help the noob. I am writing a Telegram bot in PHP, I do not use other APIs, only the API of the telegram itself. The essence of the idea is this. (bot for issuing a report at a given address) After entering the /start command, if the user ID is in my database, then he will be prompted to enter a street name. (This feature works). How can I organize a dialogue, I can’t fucking understand what calback_data is and how to use it. That is, after the invitation has come out, I need to enter the name of the street, the user writes the name of the street and this name is entered into the database. After he wrote the street, an inline_keyboard or just a keyboard should appear in response, which says (first button. down the street), second, enter the house number), and if he presses to issue a report on the street in order to take the name of the street that he entered from the database and make a request in the database. (how to make a request for the necessary information, everything is there and works) and the second button if he presses to enter the house number, then, accordingly, after entering it also falls into the same table where before he entered the name of the street. And so on to the name of the apartment. I just don't understand how to build a dialogue with a question and answer. Please explain popularly for a noob, I beg you, I will be forever grateful to you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question