added laboratory creation with API secret and key
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
include('../include/headscript.php');
|
||||
include('../class/company.php');
|
||||
$conn = new mysqli($servername, $username, $password, $database);
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$idlab = $_POST['idlab'];
|
||||
|
||||
$stmt = $conn->prepare("DELETE FROM laboratories WHERE idlab = ?");
|
||||
$stmt->bind_param("i", $idlab);
|
||||
|
||||
if ($stmt->execute()) {
|
||||
echo json_encode(["status" => "success", "message" => "Laboratory deleted successfully."]);
|
||||
} else {
|
||||
echo json_encode(["status" => "error", "message" => "Failed to delete laboratory."]);
|
||||
}
|
||||
$stmt->close();
|
||||
}
|
||||
$conn->close();
|
||||
Reference in New Issue
Block a user