...

View Full Version : Flash with PHP Login



batmans_friend
03-18-2009, 12:08 AM
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):


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 :D

gnomeontherun
03-18-2009, 10:59 AM
Did you follow the tutorial exactly and it still didn't work?

Have you traced the values back in?

batmans_friend
03-18-2009, 07:47 PM
Yes, but then I changed the variable names and added 2 extras and it just doesn't receive.
Traced the values back in?

batmans_friend
03-18-2009, 10:52 PM
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 :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum