douzhantanju1849 2012-06-26 22:54
浏览 81

Flash注册表

I need help with my flash registration form. I made sure all my information is correct, but when I enter the information, it doesn't seem to enter it into the mysql database. Here is the flash code:

var lvSend:LoadVars = new LoadVars();
var lvReceive:LoadVars = new LoadVars();

register_btn.onRelease = function() {
var valid:Boolean = validateForm();

if(valid){
//gather information and put in loadvars object
lvSend.username = username.tInput.text;
lvSend.password = password.tInput.text;
lvSend.email = email.tInput.text;

//send information php script for insertion into database
lvSend.sendAndLoad("register.php", "POST");
}
};
function validateForm():Boolean{
if(username.tInput.text == "" || password.tInput.text == "" || email.tInput.text == ""){
    return false;       
}
    return true;
}
function clearTextFields():Void{
username.tInput.text = "";
password.tInput.text = "";
email.tInput.text = "";
}

Here is the Php Code:

http://i.stack.imgur.com/cvvcO.png

Sorry that my code is in picture form. That was the best way I could make it readable by you guys.My problem is that all the information in both codes seem correct. All my text fields are called username, password, and email, same goes for the database columns. The database info isn't wrong because I used the php code with html, I just can't get it to work with flash. My php file is called register.php and my flash file is called play.swf. Thanks for your help!

  • 写回答

1条回答 默认 最新

  • doumowu7371 2012-06-26 23:01
    关注

    try:

    lvReceive.onLoad = function(success:Boolean) {
    if (success) {
        trace("ok");
    }
    else {
        trace("error");
        }
    
    lvSend.sendAndLoad("register.php", lvReceive, "POST");
    
    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?