I am creating a simple HTML form with PHP. When I log my name into the text box, I receive the following text box. Could anybody tell me what the problem is here?
Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
Warning: Cannot modify header information - headers already sent in Unknown on line 0
<html>
<body>
<h1>Hello from <?php echo 'PHP!'; ?>
</h1>
<p>My name is <?php echo gethostname(); ?>
</p>
<?php
$ver = phpversion();
if (strpos($ver, '5.3') === false) {
echo '<p>I am something else - ' . $ver . '</p>';
}
else {
echo "<p>I am a 5.3 variant - $ver </p>";
}
?>
<?php if (isset($_POST['btnSubmit'])) : ?>
<p>
Hello <?php echo $_POST['txtName'];?>
<?php else : ?>
<p>
What is your name?
<form action="index.php" method="POST">
<input type="text" name="txtName" />
<input type="submit" name="btnSubmit" />
<form>
</p>
<?php endif; ?>
</body></html>