There is a simple form:
<form name="test" method="post"> <p><b>Ваше имя:</b><br> <input type="text" size="40" name="user"> </p> <input type="submit" value="Отправить"> </form> And php code:
<?php $name = $_POST ['user']; for ($i = 0; $i < count($name); $i++){ echo "<pre>"; echo $name; //пытался также $name[$i] echo "</pre>"; } ?> It is necessary that, without updating the page, each user is displayed above the form one after another after submit. But in my output, the username is replaced with a new one when a new one is entered into input-e.