Hm, it seams that I was wrong. Don't know what is happening. Just now I have entered unused username and the data was stored in database. But _root.body.stranice.regfor
Main Topics
Browse All TopicsI'm trying to create registration form in flash as2 + php. But sendAndLoad function works only once! I have even tried to delete myVars after loading data but it's the same.
If user first time opens registration form and enters unused username it's ok, data is sent. But if he enters a username that is in use, php script sends error as checklog=2, and when he changes username in the one unused and clicks send button once more there is still checklog 2 error and the data is not stored in database. So it seams that it doesn't work in both ways, send, and load. Here is my script, please help.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hm, it seams that I was wrong. Don't know what is happening. Just now I have entered unused username and the data was stored in database. But _root.body.stranice.regfor
I have changed a function. Maybe I can explain better now what is happening.
In php I have something like this:
$retval = $session->register($_POST['
if($retval == 0){
$_SESSION['regsuccess'] = true;
print "situation=You are registrated&checklog=1";
}
/* Error found with form */
else if($retval == 1){
$_SESSION['value_array'] = $_POST;
$_SESSION['error_array'] = $form->getErrorArray();
$usernameerror=$form->error
$emailerror=$form->error("e
$passworderror=$form->error
print "situation=Registration failed. ".$usernameerror." ". $emailerror." ". $passworderror.".&checklog
}
/* Registration attempt failed */
else if($retval == 2){
$_SESSION['regsuccess'] = false;
print "situation=Registration failed.&checklog=3";
}
When i submit form in flash with unused username everything is ok, data is passed into database and I get back in flash "You are registrated".
But if I submit a form with used username, I get back in flash "Registration failed. Username allready in use." (that is ok) but if I change username into one unused and press send button again there is still the same error "Registration failed. Username allready in use.".
Also if I delete @ mark from email in this same form and press send button once more I get more info about errors: "Registration failed. Username allready in use. Email is not correct."
But if I put @ mark back again and press send button again error info is stil there: "Registration failed. Username allready in use. Email is not correct." although now we have correct email and unused username in the form.
When I use this form on my local comp form fla file -> test movie, if I submit used username and get info about errors even when i close the window and start test movie again there is the same error. Only if I delete temporary internet files with offline contents and start movie again there is no errors.
So it's probably the flash that is caching this vars? How can I empty this cache?
Business Accounts
Answer for Membership
by: CyanBluePosted on 2009-08-23 at 08:56:30ID: 25163043
When you say it only works initially, are you saying that the server never get hit again second time???
At any rate, you probably have a line that looks like this...
var myVars:LoadVars = new LoadVars();
Move that line to the line 2 of the above sample, and see if it does the job for you...
CyanBlue