The form code that you posted did not include a valid submit element so I added one. It appears that it got truncated, as your most recent post includes the rest of the line.
You cannot submit your form the way you are trying to. You need to do something like this instead:[php]submit[/php]
I have no idea what your intent is regarding the other link that is marked clear. I would guess that you intend to have it reset the form, if that is you intent, try this:[php]clear[/php]
You are using an html fieldset but you have no closing fieldset tag. I don’t know where you want it, so I guessed, but you may need to change it. Also, if you use the fieldset tag, you must also include a legend. I have added this element for you.
You are missing two closing div tags in the end section of your form.
As I mentioned previously, this is not a complete document. You need to make sure that the page it appears on has an appropriate doctype, head, title, and that this code is inside the body. You also need to make sure you include the appropriate end tags for each of these elements.
Here is the reworked form as a complete document (using the same doctype you used in your Feedback.php file):[php]
Feedback Form
get in touch
Please complete the following information
Message:
[/php]
If this is going into an existing page, only copy and paste the appropriate form section. See note regarding this below.
You Feedback.php file now has two doctypes, and heads. This is invalid markup and needs to be fixed. In addition, since we eliminated the submit button, we will need to change the isset check.
The reason that you are not getting the name, phone number, or email is that you aren’t including them in the message that you are sending. I have changed your message to include them.
Try this:[php]
Contact Form PHP
<?php
if(isset($_POST['Name'],$_POST['E-Mail'],$_POST['Phone'],$_POST['Message']))
{
$Name = $_POST['Name'];
$E_Mail = $_POST['E-Mail'];
$Phone = $_POST['Phone'];
$Message = "$Name\r\n$E_Mail\r\n$Phone\r\n\r\n\r\n";
$Message .= $_POST['Message'];
$mail_to_send_to = "
[email protected]";
$your_feedbackmail = "
[email protected]";
$subject = "Contact Us";
$headers = "From:
[email protected]" . "\r\n" . "Reply-To: $your_feedbackmail" . "\r\n" . "Name: $Name" . "\r\n" ;
$a = mail( $mail_to_send_to, "PW Contact Us Message", $Message, $headers );
}
else die('You did not enter all required information. Please go back and complete the form.');
?>
Optional page text here.
[/php]