It means there's nothing in $_POST['text']
-- and there won't be, until after the form is submitted. You need to use isset()
to check:
<?php
if(isset($_POST['text'])) {
$text = $_POST['text'];
echo $text;
}
?>
<form action="index.php" method="post">
<input type="text" name="text" />
<input type="submit">
</form>