我并不真正使用 PHP,而且这样做超出了我的能力范围。我正确设置了 XAMPP 及其“sendmail”文件夹,以便我可以从我创建的网站发送电子邮件。电子邮件会发送给该人,但问题是,每当我第一次发送邮件后尝试刷新时,网页都会告诉我“您正在查找您输入的已使用信息的页面。返回到该页面可能会导致您所采取的任何行动被重复”。因此,如果我单击“继续”,页面会刷新,但邮件会再次发送。
我尝试使用标头进行重定向,但它并没有真正起作用。我收到一条错误,指出“无法修改标头信息 - 标头已发送”。我也尝试过一些AJAX功能但没有成功。我真的无法理解这个问题,我现在非常感谢一些帮助
这是我的表单 HTML
<form method="post" action="#" class="contact-form" autocomplete="off">
<div class="row">
<div class="col span-1-of-3">
<label for="name">Name</label>
</div>
<div class="col span-2-of-3">
<input type="text" name="name" id="name" placeholder="Your name" required>
</div>
</div>
<div class="row">
<div class="col span-1-of-3">
<label for="email">Email</label>
</div>
<div class="col span-2-of-3">
<input type="email" name="email" id="email" placeholder="Your email" required>
</div>
</div>
<div class="row">
<div class="col span-1-of-3">
<label for="find-us">How did you find about us?</label>
</div>
<div class="col span-2-of-3">
<select name="find-us" id="find-us">
<option value="friends" selected>Friends</option>
<option value="search">Seach Engine</option>
<option value="other">Other</option>
</select>
</div>
</div>
<div class="row">
<div class="col span-1-of-3">
<label>Newsletter</label>
</div>
<div class="col span-2-of-3">
<input type="checkbox" name="newsletter" id="newsletter" checked>Yes, please
</div>
</div>
HUWWW