Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 24th, 2003, 10:26 PM
bbob bbob is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 1 bbob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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 !

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > wierd variable scope returning from php


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway