... but generally unlearn unnecessarily insert variables into strings. If you get used to it, there will be misunderstandings with objects and keys of arrays. Plus do not let variables without verification.
<?php $name = isset($_POST['name']) ? $_POST['name'] : 'Unknown'; $age = isset($_POST['age']) and $_POST['age'] > 0 ? (int) $_POST['age'] : 'Unknown'; echo 'Привет,' . $name . ', Вам ' . $age . ' лет '; ?> <html><body> <form action="lost.php" method="post"> Введите имя: <input type=text name="name"><br> Введите возраст: <input type=text name="age"><br> <input type=submit value="GO!"> </form> </body></html>
Like that)