10) { header('Location: index.php?status=error&message=Token+symbol+cannot+be+longer+than+10+characters.'); exit; } try { $pdo = db(); $stmt = $pdo->prepare("INSERT INTO projects (project_name, token_name, token_symbol) VALUES (?, ?, ?)"); $stmt->execute([$projectName, $tokenName, $tokenSymbol]); header('Location: index.php?status=success'); exit; } catch (PDOException $e) { // In a real app, you would log this error. header('Location: index.php?status=error&message=Database+error.'); exit; } } // Redirect if accessed directly header('Location: index.php'); exit;