Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Flash with PHP Login

    I'm making a flash login and I have the form all working, it passes on to PHP fine which processes it fine, I've checked that, but I can't get flash to take the output back.. I wonder if anyone could help? Here's the code (I based most of it on a tutorial):
    Code:
    stop();
    //=================================
    // INIT
    //=================================
    path = "php/"; //declare path to php files
    lvOut = new LoadVars(); //create lv object
    lvIn = new LoadVars(); //create lv object
    lvIn.onLoad = function (success) {
     if(success){
     //PHP variable value to textbox
     output.text = lvIn.returnVal;
     }else{
     //...or notify of failure
     output.text = "fail";
     }
    }
    //=================================
    // BTN
    //=================================
    myBtn.onRelease = function(){
     lvOut.username = username.text;
     lvOut.pword = pword.text;
     //send to a blank window...
     //lvOut.send(path + "loginaction.php","_blank");
     //get results returned to lvIn
     lvOut.sendAndLoad(path + "loginaction.php", lvIn, "POST");
    };
    Thanks a lot

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Did you follow the tutorial exactly and it still didn't work?

    Have you traced the values back in?
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, but then I changed the variable names and added 2 extras and it just doesn't receive.
    Traced the values back in?

  • #4
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've worked it out. Thanks a lot for your help.
    The code for the box needed to be changed from "returnVal" to whatever the variable was.
    Thanks again


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •