-1
我想做一個PHP代碼提交一些信息發送到我的私人電子郵件地址我正在尋找的代碼是通過電子郵件發送並提交。 =這是我的代碼:我需要通過什麼方式發送輸入類型。提交按鈕請
"<div class="form_settings">
<p><span>Navn</span><input class="contact" type="text" name="your_name" value="" /></p>
<p><span>Email Addresse</span><input class="contact" type="text" name="your_email" value="" /></p>
<p><span>Besked</span><textarea class="contact textarea" rows="5" cols="50" name="your_message"></textarea></p>
<p style="padding-top: 15px"><span> </span><input class="submit" type="submit" name="contact_submitted" value="send"></p>
</div>"
我很喜歡PHP的新手,但很高興有一些幫助。謝謝你的回覆我的問題,如果我會提醒爲了讓用戶知道郵件已發送,我該怎麼辦? – Jgoldenlion 2014-11-05 11:52:06
您可以使用其他頁面(例如我們e action =「confirmation.php」在
或者您也可以更改: 郵件($ to,$ subject,$ message,$ headers); 對此: if(mail($ to,$ subject,$ message,$ headers)){ header('Location:confirmation.php'); }; 這比我寫的其他的更好,因爲如果郵件發送成功(郵件()返回true,它只會重定向)。 – 2014-11-05 12:48:15