prepare($sql); $stmt->bindParam(':promo_code', $promo_code, PDO::PARAM_STR); $stmt->execute(); $result = $stmt->fetchAll(PDO::FETCH_ASSOC); if ($result) { jsonSuccess($result); } else { jsonError("Failed to retrieve promo records"); } ?>