Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
814 stars 343 forks source link

how to save in mysql database? #118

Closed smaz170 closed 6 years ago

smaz170 commented 6 years ago

How can I save my bot users data in the database? Thanks for responding...

Eleirbag89 commented 6 years ago

You can store the chat_id in to a table and check it everytme the bot receive a message

saeed2922 commented 6 years ago

$chat_id=$telegram->chatid() $query="insert into table( chat_id )values('$chat_id' ); mysqli_query($link,$query);