我已经保存了本教程中的代码:http: //myphpform.com/final-form.php,它应该在表单提交时发送一封电子邮件。
我想在一个简单的联系页面中使用它。这是标记:
<main role="content">
<section>
<header>
<h1>Contact</h1>
</header>
<section role="contact-us">
<form action="/Script/contact.php" method="post">
<label for="name">Full name</label>
<input type="text" name="yourname" placeholder="Name..." id="name">
<label for="email" name="email">Email address</label>
<input type="text" placeholder="you@email.com" id="email">
<textarea placeholder="Your comments..." rows ="5" name="comment-text" name="comments"></textarea>
<input type="submit" value="Send" name="submit">
</form>
</section>
</section>
</main>
PHP应该去哪里,它是否需要以任何方式转换?