0
新手在PHP,但設法得到這個,運行和工作很好。他們現在想要發送給病人的自動回覆電子郵件,填寫在線表格。我不在乎我補充的是什麼......它只是看起來像任何依賴電子郵件。在我開始尋求一些藥物之前,任何人都可以幫助我。 :/ 非常感謝。PHP自動回覆電子郵件
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$name_of_medication = $_POST['name_of_medication'];
$strength_dosage = $_POST['strength_dosage'];
$amount_taken_daily = $_POST['amount_taken_daily'];
$would_like_a = $_POST['would_like_a'];
$would_like = $_POST['would_like'];
$pharmacy_address = $_POST['pharmacy_address'];
$message = $_POST['message']; //-- all above info to be filled out by patient --//
$formcontent=" From: $name \n Name of Medication: $name_of_medication \n Strength
/Dosage: $strength_dosage \n Amount Taken Daily: $amount_taken_daily \n I would like a:
$would_like_a \n I would like: $would_like \n Pharmacy Name: $pharmacy \n
Pharmacy Address:
$pharmacy_address \n Message/Notes: $message";
$recipient = "[email protected]";
$subject = "Prescription Request Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Your Prescription Request has been received and will be processed within 48 hours.
Thank you!" ;
//-- all above info to be emailed to our doctor's office --//
$formcontent2=" From: $name \n Name of Medication: $name_of_medication \n Strength
/Dosage: $strength_dosage \n Amount Taken Daily: $amount_taken_daily \n
I would like a:
$would_like_a \n I would like: $would_like \n Pharmacy Name: $pharmacy \n
Pharmacy Address: $pharmacy_address \n Message/Notes: $message";
$recipient = $_POST['email'];
$subject = "Prescription Request Form";
$mailheader = "[email protected]";
mail($_POST['email'], $subject, $formcontent, $mailheader);
//-- all above info to be auto (auto reply) emailed to patient --//
?>