我讓它工作了一分鐘,我不知道我做了什麼來阻止它工作。它仍然帶我到另一頁上提交,但我的電子郵件絕對沒有活動。聯繫表格不發送
HTML
<form id="contact_form" action="sendemail.php" method="post">
<p><label>Name:<br />
<input type="text" name="name" class="textfield" value="" />
</label></p>
<p><label>Email: <br />
<input type="text" name="email" class="textfield" value="" />
</label></p>
<p><label>Phone Number: <br />
<input type="text" name="phone" class="textfield" value="" />
</label></p>
<p><label>Detail: <br />
<textarea name="detail" class="textarea" cols="45" rows="5"></textarea>
</label></p>
<p><input type="submit" name="submit" class="button" value="Submit" /></p>
</form>
PHP
<?php
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$phone = $_REQUEST['phone'];
$detail = $_REQUEST['detail'];
$message = "Name: $name\nEmail: $email\nPhone Number: $phone\nDetail: $detail" ;
mail("[email protected]", "You have recieved a message", "Information Requested:\n\n$message", "From: $email") ;
header("location: http://mywebsite.com/thanks.html");
?>
你收到任何錯誤消息,這將您的垃圾郵件文件夾 – Austin 2012-07-15 22:56:31
? – 2012-07-15 22:57:15
您是否設置了郵件服務器? – patricksweeney 2012-07-15 23:00:49