prepare("DELETE FROM processes WHERE id = :id"); $stmt->bindParam(':id', $id, PDO::PARAM_INT); if ($stmt->execute()) { header('Location: index.php?success=processdeleted'); exit(); } else { header('Location: index.php?error=deletionfailed'); exit(); } } catch (PDOException $e) { error_log("DB Error: " . $e->getMessage()); header('Location: index.php?error=dberror'); exit(); } } else { header('Location: index.php?error=invalidrequest'); exit(); } ?>