php if isset _POST submit text htmlspecialchars _POST text echo text e

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<?php
if(isset($_POST['submit'])){
$text = htmlspecialchars($_POST['text']);
echo $text;
}
echo '<form action="" method="POST">
<input type="text" name="text"><br />
<input type="submit" name="submit" value="Отправить">
</form>';
?>