File "get_plan_details.php"
Full path: /home/quiczmwg/lightspringdigitals.com/../../quiczmwg/wealthspringinc.org/get_plan_details.php
File size: 456 B
MIME-type: text/x-php; charset=us-ascii
Charset: utf-8
Download Open Edit Advanced Edit Back
<?php
include '_db.php';
if (isset($_GET['id'])) {
$planId = $_GET['id'];
$sql = "SELECT roi, minimum, maximum, days AS duration FROM plans WHERE id = ?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("i", $planId);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows > 0) {
$data = $result->fetch_assoc();
echo json_encode($data);
} else {
echo json_encode(null);
}
}
?>