GUI improvements and new assetclass description

This commit is contained in:
2023-03-02 18:58:04 +01:00
parent 6a5c483c42
commit 6ebaea2d45
27 changed files with 127 additions and 57 deletions

View File

@@ -35,15 +35,17 @@ switch ($submit = form_get_action()) {
$description = sanitize($_POST['description']);
$color = sanitize($_POST['color']);
$type = sanitize($_POST['cable_type']);
$links = sanitize($_POST['links']);
$info = sanitize($_POST['info']);
$sql = "INSERT INTO cable
(cable_description, cable_color, cable_type, cable_info)
(cable_description, cable_color, cable_type, cable_links, cable_info)
VALUES
(:description, :color, :type, :info)";
(:description, :color, :type, :links, :info)";
$sth = $dbh->prepare($sql);
$sth->bindValue(':description', $description, PDO::PARAM_STR);
$sth->bindValue(':color', $color, PDO::PARAM_STR);
$sth->bindValue(':type', $type, PDO::PARAM_STR);
$sth->bindValue(':links', $info, PDO::PARAM_INT);
$sth->bindValue(':info', $info, PDO::PARAM_STR);
$sth->execute();
$id = $dbh->lastInsertId();