Posted by:
Armando
(---.tampabay.res.rr.com)
When I put the following form into a file called simpleform.html, just like the PHP tutorial I am using says...
<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>
Then it instructs me to create a PHP file called send_simpleform.php so that it can display the information put into the form:
<?php
echo "<p>Welcome <b>$POST[user]</b>!</p>";
echo "<p>Your message is:<br><b>$_POST[message]</b></p>";
?>
I put them both on my wamp server, then when I tested out the form and submitted some info all it did was display the PHP code I put in the send_simpleform.php file. Is it something I didn't enable in one of the config files? or is it just something wrong with the code?