<?php
include '../database.php';

$sql = "SELECT `user_id` FROM users";
$result = $db->query($sql);

if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
        if($row["user_id"] != '0'){
            $text .= $row["user_id"]. "\n";
        }
    }
}
$db->close();
if(!isset($_GET['text'])){
    $json['from_id'] = $_GET['from_id'];
    $json['mas'] = $_GET['id'];
    file_put_contents('json.json',json_encode($json));
}
file_put_contents('list_user.txt',$text);
?>
