[請益] php送信與flash結合的問題
在FLASH填表單 想透過PHP端送出
但是怎麼都收不到信
小弟是初者 也是找範例來修的
請高手替我看一下我少了什麼好嗎?謝謝~~
==========================================================================
FLASH 送出按鈕程式:
on (release) {
for (i=1; i<_parent.fields_descriptions.length; i++) {
if
(_parent[_parent.fields_descriptions[i][1]]!=_parent.fields_descriptions[i][2])
{
this[_parent.fields_descriptions[i][1]]=_parent[_parent.fields_descriptions
[i][1]]+"&777&"+_parent.fields_descriptions[i][2];
}
_parent.reset_txt(_parent["t"+i], _parent.fields_descriptions[i][1],
_parent.fields_descriptions[i][2]);
}
this.recipient=_parent.rec;
i=undefined;
getURL("contact."+_parent.serv, "_blank", "POST");
}
==============================================================================
FLASH第一格影片第一格
rec="pedrowei2000@yahoo.com.tw";
serv="php";
var fields_descriptions= Array ("",
Array("t1", "your_name", "Your name:"),
Array("t2", "your_email", "E-mail address:"),
Array("t3", "telephone", "Phone:"),
Array("t4", "message", "Your message:")
);
function reset_txt(name,name2,value) {
path=eval(_target);
path[name2]=value;
this[name].onSetFocus=function() {
path=eval(_target);
if(path[name2]==value) { path[name2]="";}
}
this[name].onKillFocus=function() {
path=eval(_target);
if(path[name2]=="") { path[name2]=value;}
}
}
for (i=1; i<=fields_descriptions.length; i++) {
reset_txt("t"+i, fields_descriptions[i][1], fields_descriptions[i][2]);
}
===========================================================================
PHP
<?
Error_Reporting(E_ALL & ~E_NOTICE);
while ($request = current($_REQUEST)) {
if (key($_REQUEST)!='recipient') {
$pre_array=split ("&777&", $request);
$post_vars[key($_REQUEST)][0]=$pre_array[0];
$post_vars[key($_REQUEST)][1]=$pre_array[1];
}
next($_REQUEST);
}
reset($post_vars);
$subject="From ".$post_vars['your_name'][0] ;
$headers= "From: ".$post_vars['your_email'][0] ."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
$message='';
while ($mess = current($post_vars)) {
if ((key($post_vars)!="i") && (key($post_vars)!="your_email") &&
(key($post_vars)!="your_name")) {
$message.="<strong>".$mess[1]."</strong> ".$mess[0]."<br>";
}
next($post_vars);
}
mail($_REQUEST['recipient'], $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$message."
</body>
</html>" , $headers);
echo ("Your message was successfully sent!");
?>
<script>
resizeTo(300, 300);
</script>
=======================================================
麻煩各位高手了 謝謝!
--
http://www.shipskill.com/7/
視覺工作室~耶~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.223.66.161
推
11/12 00:55, , 1F
11/12 00:55, 1F
推
11/12 00:59, , 2F
11/12 00:59, 2F
推
11/12 01:57, , 3F
11/12 01:57, 3F
→
11/13 01:13, , 4F
11/13 01:13, 4F
→
11/13 01:13, , 5F
11/13 01:13, 5F
→
11/13 01:13, , 6F
11/13 01:13, 6F
推
11/13 10:38, , 7F
11/13 10:38, 7F
PHP 近期熱門文章
PTT數位生活區 即時熱門文章
151
156