$text]); exit; } (!isset($_GET['token']) || md5($_GET['token']) != "d3fbcabfcf3648095037175fdeef322f") && error("token not correct.", 401); $pdo = new PDO("mysql:host=localhost;dbname=phpmasterdb", "nobody", ""); $stmt = $pdo->prepare("SELECT name, username FROM users WHERE enable AND cvsaccess"); if (!$stmt->execute()) { error("This error should never happen", 500); } $results = $stmt->fetchAll(PDO::FETCH_ASSOC); if (!$results) { error("This should never happen either", 404); } echo json_encode($results);