Question: I'm new to Web development and have been messing around with `BootStrap`. I've been trying to make a Web form on my new website, but I can't seem to access the username variable.

Here's my form code:

```
    <form class="navbar-form navbar-left" role="search" action="username">
        <div class="form-group">
            <input name="username" type="text" class="form-control" placeholder="Username">
        </div>
        <button type="submit" class="btn btn-default">Search</button>
    </form>

```

And here's my `index.php` in the username folder:

```
    <?php
        echo $_POST['username'];
        echo 'fail';
        echo 'username';
        if(isset($_POST['username'])) {
            $name = $_POST['username'];
            echo 'success';
        }
    ?>

```

With my debugging, I get the message fail to show up, but not the username, so I assume I am doing something wrong either with setting the username, or accessing it.

Answer: 
According to your description, your HTML code should look something like this:

```
<form method="post" class="navbar-form navbar-left" role="search" action="username/index.php">
    <div class="form-group">
        <input name="username" type="text" class="form-control" placeholder="Username">
    </div>
    <button type="submit" class="btn btn-default">Search</button>
</form>

```

You could also use `<input class="btn btn-default" type="submit" value="Search"/>` instead of `<button type="submit"></button>`.
Set your `action` attribute to `index.php` and set your `method="post"` if you access the username with `$_POST['username']`.