prepare($sql); $stmt->bindParam(':promoCode', $promoCode); stmt->bindParam(':description', $description); stmt->bindParam(':validityStartDate', $validityStartDate); $stmt->bindParam(':validityEndDate', $validityEndDate); stmt->bindParam(':id', $id, PDO::PARAM_INT); $stmt->execute(); if ($stmt->rowCount() > 0) { jsonSuccess(null, "Promo data updated successfully"); } else { jsonError("Failed to update promo data"); } ?>