Flash Actionscript 3错误:错误#2101:传递给URLVariables.decode()的String必须是包含名称/值对的URL编码查询字符串

时间:2014-05-14 18:09:14

标签: php mysql database actionscript-3

以下是完整错误:

Error: 
Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
    at Error$/throwError()
    at flash.net::URLVariables/decode()
    at flash.net::URLVariables()
    at flash.net::URLLoader/onComplete()

我无法让这个为我的生活而工作。我尝试过在网上找到的所有东西。我开始认为它可能是我的PHP中的一个错误。在调试模式下,它声明我有沙盒安全性错误。据我所知,应该在测试模式下免除。 AS3代码:

function NewEntry(ev:Event):void{
var Data:URLVariables = new URLVariables();
var SystemLoader:URLLoader = new URLLoader();
var DatabaseRequest:URLRequest = new URLRequest("myphpscript.php");
DatabaseRequest.data = Data;
SystemLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
DatabaseRequest.method = URLRequestMethod.POST; 
    Data.First_Name = FirstName.text
    Data.Last_Name = LastName.text
    Data.UserBirthday = DOB_year.text
    Data.PhoneNo = PhoneNum.text
    Data.Email = UserEmail.text
    Data.requester = "NewSale";
    SystemLoader.load(DatabaseRequest);
    SystemLoader.addEventListener(Event.COMPLETE, receiveLoad);
}
function receiveLoad(ev:Event):void{
    trace("DONE");
}

这是我修复的PHP代码:

<?php

// Establish secure connection
$link = mysql_connect('spvfcorg.ipagemysql.com', 'events_admin', 'SPVFC6events'); 
if (!$link) { 
    die('Could not connect: ' . mysql_error()); 
} 
echo 'Connected successfully'; 
mysql_select_db(events_60); 


if ($_POST['requester'] == "NewSale") {

     $FirstName = $_POST['First_Name'];
     $LastName = $_POST['Last_Name'];
     $Birthday = $_POST['UserBirthday'];
     $PhoneNumber = $_POST['PhoneNo'];
     $Email = $_POST['UserEmail'];

$mysqli_query = mysql_query($link, "INSERT INTO events_60 (LastName, FirstName, Birthday,           Phone, email) 
        VALUES('LastName','$FirstName','$Birthday', '$PhoneNumber', 'Email')");

echo ("System_Updated");
} // close first if for post

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// close mysql connection
mysql_close();
?>

0 个答案:

没有答案