I didn't intend to imply that your questions are unwanted or an annoyance...quite the opposite. I, and I'm sure others, enjoy exchanging their knowlege on the subject, and teaching others only helps us learn better.
But it is nice to have a resource to fall back on for many of the simple things when first beginning...then you can save the really perplexing troubles for posting :P
anyway...that script is not going to work on most servers now, as it requires REGISTER_GLOBALS to be on in php.ini...and for security purposes it's been set to 'off' by default in php version 4 and above...
there are two solutions.
the first is not recommended, but you can enable REGISTER_GLOBALS if you're hosting on an Apache server. Just add the following line to a text file, and save it as .htaccess
there is no file name, just the extension .htaccess
php_value register_globals 1
*note: .htaccess files can be used for many, many things..including banning users, setting directories, custom error pages, etc.
There's plenty of information about .htaccess files
or, the better solution would be to modify the script.
this is what you'd want.
<?php
$c_name = $_POST['name'];
$c_email = $_POST['email'];
$c_comments = $_POST['comments']
$recipient = "
[email protected]";
$subject = "New Feedback from my site";
$mailheaders = "From:$email";
$mailheaders .= "Reply-To:$email";
mail($recipient, $subject, $msg, $mailheaders);
header("Location: http://www.yoursite.com/thankyou.html");
?>
or something of the like.
as you see, the main change is that $_POST['fieldname'] is used to harvest the data from the form.
with register_globals on, the data is made into fieldname variables automatically...which is not really a good idea, as someone could simply create a form, point it to your script, and insert who knows what type of data .