isset($ _ POST)不工作但是isset($ _ GET)工作......为什么?

When i write - if(isset($_POST['submit'])) ,it always evaluates to false.. whereas if i simply change $_POST to $_GET, it works properly.

My HTML code-

<html>
    <body>
        <form action="welcome.php" action="post">
            <input type="text" name="username"> <br>
            <input type="submit" name="send">Click me </input>
        </form>
    </body>
</html>

My PHP code-

<?php
$name="default";
if(isset($_POST['send'])){
    $name = $_POST['username'];
}
echo $name;
?>

The output i get is "default" and not what i type in input field in the html form.. Can you tell why? Thanks in advance.

The right attribute to set the method of the request is method :

<html>
    <body>
        <form action="welcome.php" method="post">
            <input type="text" name="username"> <br>
            <input type="submit" name="send" />
        </form>
    </body>
</html>

I'll just add my comment as a community wiki answer; I don't want rep from this.

"but isset($_GET) working… why?"

Because; the method's wrong (there is none) and when it fails, it (form) defaults to a GET method.

That's what's really going on here.