<html>
<head><title>some title</title></head>
<body>
<form method="post" action="">
<input type="text" name="test1" value="<?= isset($_POST['test']) ? htmlspecialchars($_POST['test']) : '' ?>" />
<input type="submit" name="submit" />
</form>
<?php
if(isset($_POST['submit'])) {
echo 'You entered: ', htmlspecialchars($_POST['test']);
}
?>
</body>
<html>
After the click i want add new line automatically.
If now I have:
You entered: test1
After another click my text is 'test2 I have:
You entered: test1
You entered: test2
After refresh page all over again.
How do I add text after a click?