# Login using Flash, PHP and MySQL

**URL:** <https://forum.kirupa.com/t/login-using-flash-php-and-mysql/266434>\
**Category:** flash\
**Created:** [July 20, 2008, 3:46pm UTC](https://forum.kirupa.com/t/login-using-flash-php-and-mysql/266434 "2008-07-20T15:46:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![veto2019](https://avatars.discourse-cdn.com/v4/letter/v/c4cdca/32.png) [@veto2019](https://forum.kirupa.com/u/veto2019)\
**Post date:** [July 20, 2008, 3:46pm UTC](https://forum.kirupa.com/t/login-using-flash-php-and-mysql/266434/1 "2008-07-20T15:46:48Z")

</div>

I already post something in this forum about a problem I had… The first one was from the side of the database but I fixed it (temporarily).

The second one:

[LIST]  
[\*]I have severals accounts in my server and a flash page which logins tu a “secret” frame in my flash file…it works perfectly. I’m triying to have a special frame for each user, but I don’t know how to do it. I’m trying using a switch case function but it doesn’t work :q::wasted:. Here is the code I used:  
[/LIST]

```auto
stop();

pass = "";

userinput.restrict = "a-zA-Z0-9";
passinput.restrict = "a-zA-Z0-9";
//this will make it so the user can't use symbols
//that could mess with your database

Selection.setFocus(userinput);
//this puts the cursor in the first box (thaks Kax!)

status = "Fill the information required";
//this enters in directions in your textbox called status

this.onEnterFrame = function() {
    if (_root.checklog == 1) {
        
       switch (userinput) {
            case 'veto' :
                _root.gotoAndStop(6); // this is my veto's frame
                break;
            case 'cata' :
                _root.gotoAndStop(7); // this is my cata's frame
                break;
            default :
                gotoAndStop("error"); // if it's not a predifined user, goes to an error frame.
        }

    }
    if (_root.checklog == 2) {
        _root.gotoAndStop("error");
    }
};

//the onEnterFrame constantly checks to see if the PHP
//script has sent the variable 'checklog' back to the
//movie and directs the people accordingly

```

Please someone can help me! [:ducky:](http://www.kirupa.com/forum/../developer/actionscript/authentication.htm)

PS: this onformation is from [“Login Using Flash MX, PHP and MySQL” from Kirupa :beer2:](http://www.kirupa.com/developer/actionscript/authentication.htm)
