<form method="post" action="welcome.php">
<label>Username: <input type="text" name="username"></label>
<button type="submit">Sign in</button>
</form>
<?php
// welcome.php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$username = trim($_POST['username'] ?? '');
echo "Welcome, " . htmlspecialchars($username) . "!";
}
?>