真的需要另一双眼睛,提前谢谢!我的PHP代码:
<?php
header('Location: videorecord.html');
$hour = time() + 3600;
setcookie(UserName, $_POST['UserName'], $hour);
$_COOKIE["UserName"];
mysql_connect("localhost", "XXX", "XXX") or die(mysql_error());
mysql_select_db("XXX") or die(mysql_error());
$insert = "INSERT INTO usercards (RecName, Message, RecEmail, EventTitle)
VALUES
('$_POST[RecName]', '$_POST[Message]', '$_POST[RecEmail]', '$_POST[EventTitle]')";
$add_member = mysql_query($insert);
$var1="recpt=".$_POST['RecName'];
echo "&lVar1=$var1";
?>
通过 AS2 脚本将变量发送到包含在头文件中的 swf。AS2 代码:
lv = new LoadVars();
// define onLoad Callback
lv.onLoad = onLoadCallBack;
// send and load variables
lv.load("http://XXXXX.com/pages/process_card.php");
// onLoad Callback
function onLoadCallBack(success)
{
// if succes
if(success)
{
// trace variables
trace(this.lVar1);
_global.lVar1 = this.lVar1;
}
else
{
// loading failed
trace("Loading Error!!");
}
}
//end getting the external data
var movieName:String = lVar1;
最终结果不断变得不确定以返回。我做 php,但这个 AS2 的东西对我来说是新的(通过谷歌得到代码),在 AS3 上稍微好一点。感谢任何建议,帮助,寻找答案的 2 天,我即将完成。谢谢