I'm very new to PHP; just started yesterday! Anyway, I've been trying to run what should be a simple form reading process. I've searched the database for similar questions but can't seem to find one. I'm trying to read the name and message variables from an HTML form, but to no avail. Basically, the data from the form is not being printed out to the PHP file. I can't seem to find anything wrong with the code so I can only guess that it might be the php.ini file? The code I've been working on is below;the software in use are: PHP 5.2.9, Apache 2.2 on Fedora 10. I would greatly appreciate any help. Thank you!
Code: Select all
<html>
<head>
</head>
<body>
<form action="/cgi-bin/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>";
?>