View Full Version : Flash with PHP Login

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

path = "php/"; //declare path to php files
lvOut = new LoadVars(); //create lv object
lvIn = new LoadVars(); //create lv object
lvIn.onLoad = function (success) {
//PHP variable value to textbox
output.text = lvIn.returnVal;
//...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

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?

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?

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