'', 'game' => '', 'class_name' => '', 'patch' => '', 'summary' => '', 'skills' => '', 'gear' => '', 'author' => '', ]; if ($_SERVER['REQUEST_METHOD'] === 'POST') { foreach ($values as $key => $value) { $values[$key] = trim($_POST[$key] ?? ''); } if ($values['title'] === '') { $errors[] = 'Title is required.'; } if ($values['game'] === '') { $errors[] = 'Game is required.'; } if ($values['class_name'] === '') { $errors[] = 'Class is required.'; } if ($values['author'] === '') { $errors[] = 'Author name is required.'; } if (!$errors) { $stmt = db()->prepare( "INSERT INTO builds (title, game, class_name, patch, summary, skills, gear, author) VALUES (:title, :game, :class_name, :patch, :summary, :skills, :gear, :author)" ); $stmt->execute([ ':title' => $values['title'], ':game' => $values['game'], ':class_name' => $values['class_name'], ':patch' => $values['patch'] ?: null, ':summary' => $values['summary'] ?: null, ':skills' => $values['skills'] ?: null, ':gear' => $values['gear'] ?: null, ':author' => $values['author'], ]); $id = (int)db()->lastInsertId(); header('Location: build.php?id=' . $id . '&created=1'); exit; } } include __DIR__ . '/includes/header.php'; ?>

Publish a Build

Share your strategy with a concise overview, skills, and gear notes.

Back to builds
Keep it short: 1-2 sentences.