$name created"; header("Location: " . $_SERVER["HTTP_REFERER"]); } if (isset($_POST['edit_software_template'])) { $software_id = intval($_POST['software_id']); $name = sanitizeInput($_POST['name']); $version = sanitizeInput($_POST['version']); $description = sanitizeInput($_POST['description']); $type = sanitizeInput($_POST['type']); $license_type = sanitizeInput($_POST['license_type']); $notes = sanitizeInput($_POST['notes']); mysqli_query($mysqli,"UPDATE software SET software_name = '$name', software_version = '$version', software_description = '$description', software_type = '$type', software_license_type = '$license_type', software_notes = '$notes' WHERE software_id = $software_id"); // Logging logAction("Software Template", "Edit", "$session_name edited software template $name", 0, $software_id); $_SESSION['alert_message'] = "Software template $name edited"; header("Location: " . $_SERVER["HTTP_REFERER"]); }