I am simply trying to read the input from a form, but the variables don't seem to resolve. This is from Meloni's book, PHP, MySQL, and Apache, lesson 11. All the lessons prior to this one worked properly, so I am at a loss to understand why this one doesn't.
My form is defined as:
Code: Select all
<html>
<head>
<title>A simple HTML form</title>
</head>
<body>
<form action="send_simpleform.php" method="POST">
<p><strong>Name:</strong><br/>
<input type="text" name="user"></p>
<p><strong>Message:</strong><br/>
<textarea name="message" rows="5" cols="40"/></textarea></p>
<p><input type="submit" value="send"/></p>
</form>
</body>
</html>Code: Select all
<?php
echo "<p>Welcome <b>".$_POST["user"]."</b>!</p>";
echo "<p>Your message is:<br/><b>".$_POST["message"]."</b></p>";
?>Welcome ".$_POST["user"]."!
"; echo "
Your message is:
".$_POST["message"]."
"; ?>
Both files are in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs
as simpleform.html and send_simpleform.php.
Have I nimble-fingered something, or just missing some great truth...?