prepare("UPDATE processes SET name = :name, description = :description WHERE id = :id"); $stmt->bindParam(':name', $name, PDO::PARAM_STR); $stmt->bindParam(':description', $description, PDO::PARAM_STR); $stmt->bindParam(':id', $id, PDO::PARAM_INT); if ($stmt->execute()) { header('Location: index.php?success=processupdated'); exit(); } else { header('Location: index.php?error=updatefailed'); exit(); } } catch (PDOException $e) { error_log("DB Error: " . $e->getMessage()); header('Location: index.php?error=dberror'); exit(); } } else { header('Location: index.php?error=emptyfields'); exit(); } } else { header('Location: index.php?error=invalidrequest'); exit(); }