When users type /register, then my bot is inserting "0" instead of their user id in phpMyAdmin.
This is the code, what's causing this problem?
if (strpos($message, "/register") === 0) {
$che = mysqli_query($db, "SELECT * FROM users WHERE id = '" . $id . "' ");
$check = mysqli_fetch_assoc($che);
if ($id != $check['id']) {
mysqli_query($db, "UPDATE count SET users = users + 1");
mysqli_query($db, "INSERT INTO users(id) VALUES('$id')");
sendMessage($chatId, "<u>Done</u>", $message_id);
}
}