Update printer_settings.php

This commit is contained in:
Janis Steiner
2024-06-27 13:51:29 +00:00
committed by GitHub
parent 4f65c26118
commit 4fb1c3f0a6

View File

@@ -42,4 +42,22 @@ if($_GET["action"]=="delete_filament")
$stmt = mysqli_prepare($link, $sql); $stmt = mysqli_prepare($link, $sql);
mysqli_stmt_execute($stmt); mysqli_stmt_execute($stmt);
} }
if($_GET["action"]=="update_class")
{
$id=htmlspecialchars($_GET['id']);
$color=htmlspecialchars($_GET["value"]);
$sql="update class set name='$color' where id=$id";
$stmt = mysqli_prepare($link, $sql);
mysqli_stmt_execute($stmt);
}
if($_GET["action"]=="delete_class")
{
$id=htmlspecialchars($_GET['id']);
$color=htmlspecialchars($_GET["value"]);
$sql="delete from class where id=$id";
$stmt = mysqli_prepare($link, $sql);
mysqli_stmt_execute($stmt);
}
?> ?>