I finally have it so that when I click the submit button, I do get an email, but all that shows up is: "Name:". It doesn't tell me what the name is, or show the other two fields. (It does go to the Thank You page OK.) What am I doing wrong? Thanks in advance.
Here's the form html:
<form name="contactform" method="post" action="send_form_email.php">
<fieldset>
<legend>What shall we call it?</legend>
<label for="Name">Your name or screen-name:</label>
<input type="text" name="name" id="Name"/><br /><br />
<label for="Comment">
Comments: </label> <br /><br />
<textarea name="comment" id="Comment" cols="60" rows="6"></textarea>
<br /><br />
<label for="Studyname">
Suggested study name: </label><input type="text" name="studyname" id="Studyname" size="60" /><br />
<br />
<input type="Submit" value="Send" /><br />
<input type="Reset" value="Clear" /><br />
</fieldset>
</form>
Here's what I have for the php, using a simple example I found online, and modifying it for my form:
<?php
{
$name = $_REQUEST;
$comment = $_REQUEST;
$studyname = $_REQUEST;
mail( "myemail@gmail.com", "Study Name",
"Name: $name",
"Comment: $comment",
"Studyname: $studyname");
header( "Location: http://mywebsite.us/ThankYou.html" );
}
?>