January 24th, 2012, 08:48 PM
Join Date: Jan 2012
Time spent in forums: 35 m 15 sec
Reputation Power: 0
New Php coder, and Having some trouble!
Hello~ im just learning to code php for the first time and im having some trouble. I'm using a book right now thats helping me learn, but for whatever reason, the code that i typed out form the book is coming out with errors. I was wondering if anyone knew how to fix it?
(regular php heading here)
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<?php // Script 3.4 handle_form.php #2
ini_set ('display_errors', 1);
// Let me learn from me mistakes!
// This page receives the data from feedback.html.
// It will receive: title, name, email, response, comments, and submit in $_POST.
// Create shorthand versions of the variables;
$title = $_POST['title'];
$name = $_POST['name'];
$response = $_POST['response'];
$comments = $_POST['comments'];
// Print the received data:
print "<p>Thank you, $title $name,for your comments.</p>
<p>You stated that you found this example to be '$response' and added:<br />$comments</p>";