我保存了本教程中的代码:http://myphpform.com/final-form.php当表单提交时应该发送电子邮件。我在哪里放置了一个程序代码片段来运行在PHP.Gt中?
我想在简单的联系页面中使用它。这里是标记:
<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="[email protected]" 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应该去哪里,并且它需要以任何方式进行转换?