我正在構建Flash網站,我希望將聯繫信息發送到我的Gmail地址。通過PHP從Flash應用程序發送郵件
我使用的Lynda.com教程說我需要「輸入php地址」。那是什麼,我該怎麼做?
這是我的代碼編輯
if (thename.text == "" || theemail.text == "" || thephone.text == "" || themessage.text =="") {
thefeedback.text = "*Please fill out all fields";
} else {
var allvars:URLVariables = new URLVariables()
allvars.name = thename.text;
allvars.email = theemail.text;
allvars.phone = thephone.text;
allvars.message = themessage.text;
// Send info to a new request
var mailAddress:URLRequest = new URLRequest("http://whatever goes here.php");
mailAddress.data = allvars;
mailAddress.method = URLRequestMethod.POST;
sendToURL(mailAddress);
thefeedback.text = "Thank You";
thename.text = "";
theemail.text = "";
thephone.text = "";
themessage.text = "";
}
能否請您編輯您的問題,包括**您的Flash應用程序正在使用將數據發送到你的PHP腳本代碼**?有了這些信息,我們可以向您展示如何使用PHP發送郵件。 – Charles 2011-03-25 21:12:02
感謝那個片段,但我們需要更多。 「allvars」裏面有什麼?這是將發送到腳本的數據,我們需要知道有哪些內容可以幫助您撰寫郵件。 – Charles 2011-03-25 22:40:29
從你的意見看來,你有你的動作代碼以及你的PHP代碼,你只是不知道他們是如何一起工作的?你將需要把你的PHP腳本放在服務器上,然後將URLRequest指向它。 var mailAddress:URLRequest = new URLRequest(「http:// mydomain.com/mySimpleSampleMessage.php」); – 2011-03-26 14:38:39