提前感谢您提供的任何帮助。我束手无策,无法弄清楚我做错了什么。我已经为此工作了几天,现在在一堵砖墙上。似乎应该很简单,但事实并非如此:-(
<body>
<?php
$name = $_POST['Name:'];
$email = $_POST['E-mail:'];
$phone = $_POST['Phone:'];
$message = $_POST['Message:'];
//Sending Email to form owner
$header = "From: $email_to\n";
$header .= "Reply-To: $email\n";
$subject = "Submission From My Form";
$email_to = "your@email.us";
$message = "Name: $name\n"."E-mail: $email\n"."Phone: $phone\n"."Message: $message\n";
mail($email_to, $subject, $message, $header);
?>
<h1>Thank You for Your Submission</h1>
<p> Your information has been sent.</p>
</article>
<article class="grid_8 omega last-col">
<div class="pad_box2">
<h2 class="ind3">Get in Touch</h2>
<form method="post" id="contact-form" action="Contacts.php">
<div class="success">Contact form submitted!<br>
<strong>We will be in touch soon.</strong>
</div>
<fieldset>
<label class="name">
<input type="text" value="Name:">
<span class="error">*This is not a valid name.</span> <span class="empty">*This field is required.</span>
</label>
<label class="email">
<input type="text" value="E-mail:">
<span class="error">*This is not a valid email address.</span> <span class="empty">*This field is required.</span>
</label>
<label class="phone">
<input type="text" value="Phone:">
<span class="error">*This is not a valid phone number.</span> <span class="empty">*This field is required.</span>
</label>
<label class="message">
<textarea>Message:</textarea>
<span class="error">*The message is too short.</span> <span class="empty">*This field is required.</span>
</label>
<div class="buttons2">
<a href="#" data-type="reset" class="link1">Clear</a>
<a href="#" data-type="submit" class="link1">Submit</a>
</div>
</fieldset>
</form>
</div>
</article>