PHP / HTML:$ _POST无法正常工作或显示任何内容

I created two inputs for name and age and when the user clicks on submit, the screen has to display the values he entered in the two inputs but it does nothing.. here are my codes

<html>
<head></head>
<body>
<?php 
if(isset($_POST['submit'])){
    $name=$_POST['name'];
    $age=$_POST['age'];
    echo $name;
    echo $age;

}
?>
<form action="" method="post">
<input type="text" name="name" placeholder="name"></br>
<input type="number" name="age" placeholder="age"></br>
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>

you have to add an action for you form (to execute and send data to itself)

   <html>
    <head></head>
    <body>
    <?php 
    if(isset($_POST['submit'])){
        $name=$_POST['name'];
        $age=$_POST['age'];
    }
    ?>
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
    <input type="text" name="name" placeholder="name" value="<?php echo $age; ?>"></br>
    <input type="number" name="age" placeholder="age" value="<?php echo $age; ?>"></br>
    <input type="submit" name="submit" value="submit">
    </form>
    </body>
    </html>

You have to set the values of the input fields instead of just echoing them:

<html>
<head></head>
<body>
<?php 
$name = "";
$age = "";
if(isset($_POST['submit'])){
    $name=$_POST['name'];
    $age=$_POST['age'];
}
?>
<form action="" method="post">
<input type="text" name="name" placeholder="name" value="<?php echo $name;?>"></br>
<input type="number" name="age" placeholder="age" value="<?php echo $age;?>"></br>
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>

Use $_SERVER['PHP_SELF'] in action to send data to same page.

<html>
<head></head>
<body>
<?php 
if(isset($_POST['submit'])){
    $name=$_POST['name'];
    $age=$_POST['age'];
    echo $name;
    echo $age;

}
?>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input type="text" name="name" placeholder="name"></br>
<input type="number" name="age" placeholder="age"></br>
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>

</div>

I think you just have to check your server because I just cut and past your code and it works on my server with PHP7. Here is your code on one of my web site: http://www.ansb-brasil.org/go.php