消息发送表单



如何连接"消息发送"在html文件到php,使所有的消息在给定的形式在网站上直接发送到我的gmail地址?

<section id="contact">
<div class="container">
<div class="row">
<div class="col-md-6 col-sm-12">
<form id="contact-form" role="form" action="action.php" method="post">
<div class="section-title">
<h2>Contact us <small>We are open to talk. We work for you. Let us talk!</small></h2>
</div>
<div class="col-md-12 col-sm-12">
<input type="text" id="text" class="form-control" placeholder="Enter full name" name="text" required="">

<input type="email" id="email" class="form-control" placeholder="Enter email address" name="email" required="">
<textarea id="message" class="form-control" rows="6" placeholder="Tell us about your message" name="message" required=""></textarea>
</div>
<div class="col-md-4 col-sm-12">
<input type="submit" id="submit" class="form-control" name="send message" value="Send Message">
</div>
</form>
</div>
<div class="col-md-6 col-sm-12">
<div class="contact-image">
<img src="images/kingdom.jpg" class="img-responsive" alt="Kingdom Education Logo">
</div>
</div>
</div>
</div>
</section>

我想你知道你的属性action="action.php"将表单数据和用户带到同一个文件夹中的action.php页面,所以,只是放在那里(也有一些写作,如'Thank you for contact us'):

mail('YOUR EMAIL', _POST['text'].' ('._POST['email'.')', _POST['message']);

服务器会给你发送一封带有apache邮件的邮件对象中会有联系你的人消息作为邮件的文本

相关内容

  • 没有找到相关文章

最新更新