|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
wierd variable scope returning from php
Hello all,
I have a flash form that gathers info from users. All validation work fines except checking to see if the entered username already exists in my database. After querying the mysql database in php I do print "&VALID_USER=2" if it does exists and this if it doesn't: print "&VALID_USER=1" The php/mysql code is tested and works fine. Now here is my actionscript code on press of the submit button : on (press) { loadVariablesNum("http://www.url.com/register.php", 0, "POST"); if (VALID_USER == 1) { gotoAndPlay("Scene 3", 1); } if (VALID_USER == 2) { message = "Username alrady exists"; } if (VALID_USER == 3) { message = "PROBLEM"; } } I have 2 dynamic text fields that display the values of "message" and "VALID_USER". The first time I click the submit button I get "PROBLEM" in the message box and 2 in the VALID_USER box. The second time I click the submit button in the same movie I get "Username already exists" in the message box and 2 in the VALID_USER box. I am getting a value for VALID_USER but it semms I cannot perform a conditional statement immediately on it. Thanks in advance ! |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > wierd variable scope returning from php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|