Question: I have following html file:

```
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Fancy Website</title>
</head>
<body>
    <div id="content_login">
        <form method="post" action="app.php">
            <table>
                <thead>Please Login for more fancy Content!</thead>
                <tr>
                    <td>Username</td>
                </tr>
                <tr>
                    <td><input type="text" name="username"></td>
                </tr>
                <tr>
                    <td><input type="submit" name="login" value="Login"></td>
                </tr>
            </table>
        </form>
    </div>
</body>
</html>

```

And this is my php script:

```
<?php
    if(isset($_POST['login'])) {
        echo "Hello " . $_GET["username"];
    }
?>

```

Yeah simply nothing, but I only wanted to test, if a script would work when the Login Button is pressed. Surprise: It's not. I open index.html in my browser and the html part works properly, but if I press the Login Button the browser shows me this:

```
<?php
    if(isset($_POST['login'])) {
        echo "Hello " . $_GET["username"];
    }
?>

```

I guess it's a syntax issue but I can't find it. Maybe you see it.
Thanks a lot!

Answer: 
you should change that $\_GET["username"] to $\_POST["username"] variable to work it correctly

```
<?php
    if(isset($_POST['login'])) {
        echo "Hello " . $_POST["username"];
    }
?>

```
Do you have the php code in app.php? If you have then you have not enabled mod\_php in Apache. I would recommend you to use wampserver (on windows) since that takes care of the basic apache/php configuration.

<http://www.wampserver.com/en/> 

EDIT: You can not just execute your php code without having a webserver. Opening HTML files in your browser is client side and php is server side.