I have only been learning PHP for about a week now and bought the Sam’s teach yourself PHP, MySQL, and Apache All in One deal from the book store to start me out.
I think I have understood it pretty well, or at least as well as I can in the first week, but I have run into some trouble.
I have no problems writing the code for the simple functions, they are displayed like they are suppose to be in the browser, my trouble is when I am making a simple HTML form and a simple UPLOAD deal in HTML and I call on the php file, all that is printed on the screen is the ACTUAL php code… it doesnt perform the PHP file for me.
They are both located in the root directory, and it seems simple enough to me, but for some reason it just isn’t doing what it is suppose to do.
HERE IS THE HTML FORM:
<html>
<head>
<title>A Simple HTML Input 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>
AND THIS READS JUST FINE IN THE BROWSER
HERE IS THE PHP FILE:
[php]
Welcome ".$_POST["user"]."!
"; echo "Your message is:
".$_POST["message"]."
[/php]
This all seems so cut and dry!
ANY help would be huge right now so I can move on.
Thanks for all your help in advance!
–Rick
Admin edit: Added [code] and [php] tags for readability. Please refer to http://phphelp.com/guidelines.php for posting guidelines