[英]Confirmation email from PHP form
我有一個很好的php形式。 確認電子郵件將發送給用戶,但我希望它在消息之前在此處張貼名稱。 它不會立即發布名稱。 只需發布消息。 我希望它說類似的內容。,謝謝FULL_Name(然后發送消息)任何幫助都會動搖。
// Subject of confirmation email.
$conf_subject = 'Test Message';
// Who should the confirmation email be from?
$conf_sender = 'Test <no-reply@test.com>';
$msg .= $_POST['Full_Name']."\n";
$msg = "Thank you for your recent inquiry If you have any questions please call us at 555-555-5555 \n\n";
mail( $_POST['Email_Address'], $conf_subject, $msg, "From: $conf_sender" );
如果我正確理解這一點,則只需要在字符串中插入變量即可。
$name = $_POST['Full_Name'];
$msg = "Thank you ".$name." for your recent inquiry If you have any questions please call us at 555-555-5555 \n\n";
在您的代碼中,您要將full_name添加到$ msg。 然后用消息替換變量的內容:
$msg .= $_POST['Full_Name']."\n";
$msg = "Thank you for your recent inquiry If you have any questions please call us at 555-555-5555 \n\n";
在這段代碼中,您首先要使用full_name設置$ msg,然后添加其余消息。
$msg = $_POST['Full_Name']."\n";
$msg .= "Thank you for your recent inquiry If you have any questions please call us at 555-555-5555 \n\n";
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.