false]; if ($num) { try { $pdo = db_connect(); $sql = "SELECT screenlist FROM chandj.output WHERE num = ?"; $stmh = $pdo->prepare($sql); $stmh->bindValue(1, $num, PDO::PARAM_INT); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); if ($row) { $response['success'] = true; $response['screenlist'] = json_decode($row['screenlist'], true); } else { $response['message'] = "No data found"; } } catch (PDOException $e) { $response['message'] = "Error: " . $e->getMessage(); } } echo json_encode($response); ?>