我對PHP很新,我有這個在Windows服務器上工作,但最近剛剛遷移到LINUX服務器,現在窗體顯示爲發送,但沒有任何通過?任何幫助將不勝感激,,謝謝簡單的聯繫PHP不發送
HTML
<div class="wrapper">
<div id="contact_form">
<form action="html_form_send.php" method="POST">
<label>
<span>Name*:</span>
<br>
<input type="text" placeholder="Please enter your name" name="name" id="name" required autofocus>
</label>
<label>
<span>Phone:</span>
<input type="text" placeholder="Please enter your phone" name="phone" id="phone">
</label>
<label>
<span>Email*:</span>
<input type="email" placeholder="[email protected]" name="email" id="email" required>
</label>
<label>
<span>Message*:</span>
<input name="message" type="text" required id="message" placeholder="Message" value="">
</label>
<input class="sendButton" type="submit" name="Submit" value="Send">
</form>
</div>
PHP
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone= $_POST['phone'];
$message = $_POST['message'];
$formcontent="From: $name \n Phone:
$phone \n
Email:
$email \n
Message:
$message \n";
$recipient = "[email protected]";
$subject = "Design Contact";
$mailheader = "From: $email \n";
mail($recipient, $subject,$formcontent, $mailheader) or die("Error!");header("Location: http://website.com/website.com/success.html");
?>
建議?
它發出一個成功的消息,,但沒有顯示出來? – 2014-09-01 21:37:51
您是否檢查垃圾郵件文件夾? – HddnTHA 2014-09-01 21:39:25
1.檢查錯誤日誌。 2.請,請不要使用此代碼。永遠。使用表單中的原始數據而不進行消毒是非常危險的 – user3791372 2014-09-01 21:39:51