prepare("INSERT INTO Fines (Fine_amount, Fine_points, Incident_ID) VALUES (:amount, :points, :incident)"); $stmt->bindParam(":amount", $amount); $stmt->bindParam(":points", $points); $stmt->bindParam(":incident", $incident); $stmt->execute(); echo json_encode(array("message" => "ok")); } else if (isset($_SESSION["username"]) && !isset($_SESSION["admin"])) { echo json_encode(array("message" => "not logged in as admin")); } else { echo json_encode(array("message" => "Not logged in ")); } { }