|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Flash Discussion Forum Flash design presents a limitless number of possibilities for your sites and designs. Discuss your Flash ideas, questions and issues here. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
hey all,
I've got a problem that i can't seem to figure out. I have a login on my flash site that i'm workin on, everything works flawlessly, except that the movie won't advance when the php calls that it is a valid username and password. This is on the first frame of my movie: stop(); userinput.restrict="a-zA-Z0-9"; passinput.restrict="a-zA-Z0-9"; Selection.setFocus(userinput); status="Enter your information and submit"; this.onEnterFrame = function () { if(_root.checklog == 1){ _root.map.gotoAndPlay(2); } if(_root.checklog == 2){ _root.gotoAndPlay(3); } } this is on my submit button: //this will be the action to get your variables from the PHP on (release, keyPress "<Enter>") { //checks to see if there is something in both the name //and password if (user != "" && pass != "") { _root.status = "Begin Login Process - Wait..."; //if you changed the php file name, change it here to!! loadVariablesNum("login.php", 0, "POST"); } } this is my php: <? //connect to database if ($user && $pass){ mysql_pconnect("localhost","myuser","mypassword") or die ("didn't connect to mysql"); mysql_select_db("mydatabase") or die ("no database"); //make query $query = "SELECT * FROM users WHERE username = '$user' AND password = '$pass'"; $result = mysql_query( $query ) or die ("didn't query"); //see if there's an EXACT match $num = mysql_num_rows( $result ); if ($num == 1){ print "status=You're in&checklog=1"; } else { print "status=Sorry,wrong password!!&checklog=2"; } } ?> I have a feeling its related to the &checklog's position in the php...and how its called in the AS. I've tried several different things but they didn't work. Anyone have any ideas? Thanks! |
|
||||
|
What's the word on this issue - did you get it working? Could you also post the url for review of the error and I'm also interested in the function of this combination of flash, mysql and php.
__________________
20% Off Online Stores | Flash CMS | Blogs | Templates * Follow Our Twitter! Online Since 2003 & TemplateMonster, Logos, Design Software, Custom Websites |
|
|||
|
i'm still having the problem...i don't think the problem is with the php code above:
if ($num == 1){ print "status=You're in&checklog=1"; } else { print "status=Sorry,wrong password!!&checklog=2"; } because status shows up in a dynamic text box as "You're in" if the username and password are correct and "Sorry, wrong passsword!!" when they aren't. That part works great. The problem is that &checklog=1. I want flash to gotoAndPlay a different frame if checklog =1. But i can't get that to work. If the problem was with the code for checking the mysql database,then the if statement wouldn't work right? I don't have the site up yet because i'm stuck on this part! but as soon as it works i'll post the link. Thanks! |
|
||||
|
If I'm not mistaken.. this might be missing some server support to communicate with your site and database. Maybe you could place it in a beta page like.. yourdomain.com/beta/index.php?
It has to call your DB, User and PW so I'm thinking this might help with troubleshooting. At least in this format as our eyes are tied =) Will have to think about this one a little bit more.
__________________
20% Off Online Stores | Flash CMS | Blogs | Templates * Follow Our Twitter! Online Since 2003 & TemplateMonster, Logos, Design Software, Custom Websites |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |