我正在尝试通过从另一页(首页-Index.php)中获取数据来从联系人表单发送电子邮件。但是我的联系人没有执行重定向其他页面的操作。
当我单击“提交”按钮时,它不起作用。
<form method="post" id="form" class="contact-form" action="/contact.php">
<input type="hidden" name="_method" value="search">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<input class="form-control" id="name" name="name" placeholder="Name" type="text" required>
<span class="alert-error"></span>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input class="form-control" id="email" name="email" placeholder="Email*" type="email" required>
<span class="alert-error"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<input class="form-control" id="contact" name="contact" minlength="10" maxlength="10" placeholder="Contact Number*" type="text" required>
<span class="alert-error"></span>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<input class="form-control" id="contact" name="subject" placeholder="Subject*" type="text" required>
<span class="alert-error"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group comments">
<textarea class="form-control" id="comments" name="message" placeholder="Tell Us About Your Project *" required></textarea>
</div>
</div>
<div class="col-md-12">
<button type="submit" name="submit" id="submit">
Send Message <i class="fa fa-paper-plane"></i>
</button>
</div>
<!-- Alert Message -->
<!-- <div class="col-md-12">
<div id="message" class="alert-msg"></div>
</div> -->
</div>
</form>
请帮帮我。
答案 0 :(得分:0)
大多数可能是contact.php错误。尝试打开error_reporting,只需将以下几行添加到contact.php文件的顶部:
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);