0

i'm making a bot and i'm using webhook.

User should register on my bot in telegram.

user /start the bot.

the bot request name (for example)

users write their name and send to bot

the bot request for next field

... and i continues until last field.

here i have a couple of question

how can i recognize which input is for which field and the second question is how should i store the informations?should i store that in a table in database? thanks a Ton

  • You make it in the logic of your code :) If you want to retrieve the data and use it after, you need to store it in a database. – J Johnson Oct 27 '17 at 12:10

2 Answers2

0

Use Database
For example: Bot user sends /start and bot request user name, When user send name, save that in name field in database and go to next step or user name was false, have error message. Do it step by step and save user datas to database and go to next step.

i hope, i expained it good
sorry for poor English

Mhdi
  • 11
  • 5
-1

Its easy you can create a field for each of them (i mean your information you want to take from a user) and then you can record them in a database , if you use php , you can save information in mysql through phpmyadmin, we have also course about this on udemy you wholesky clem telegram bot and php, If you need the code exactly i can write it down , just update the post i will send you...

  • please explain how in your answer, rather than referencing an online course or asking the OP to do the online course. also, phpmyadmin is NOT a database – Kristian Feb 19 '21 at 02:13
  • Its not a database , you can manage your database with php my admin, of course there is course and you can search on udemy, telegram bot and php /wholesky connect/ teacher , they have course exactly about registration in telegram bot – Caroline medai Feb 20 '21 at 10:01