# Flash login system via php

**URL:** <https://forum.kirupa.com/t/flash-login-system-via-php/330692>\
**Category:** flash\
**Created:** [March 1, 2013, 9:35pm UTC](https://forum.kirupa.com/t/flash-login-system-via-php/330692 "2013-03-01T21:35:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashnve](https://avatars.discourse-cdn.com/v4/letter/f/f9ae1b/32.png) [@flashnve](https://forum.kirupa.com/u/flashnve)\
**Post date:** [March 1, 2013, 9:35pm UTC](https://forum.kirupa.com/t/flash-login-system-via-php/330692/1 "2013-03-01T21:35:21Z")

</div>

Hello Everybody,  
I am attempting to create a Flash login via the mysql database. I have created a database in mysql and I have edited two files fla in flash and a php file using notepad text editor. I want to send my URLVariables to the php script to check the variables stored in the mysql database. Problem is i am getting no information back.

This is my fla code below: Can you please check my code for any mistakes. I copied this majority of the code from a tutorial. I am wondering if my connection url parameter to the php connection file is correct?

import flash.net.URLRequest;  
import flash.net.URLVariables;  
import flash.net.URLLoader;  
import fl.controls.Button;  
import fl.controls.TextInput;  
import flash.text.TextFormat;  
import flash.events.Event;

//Requesting the php  
var phpFileRequest:URLRequest = new URLRequest(".flashexample/");

phpFileRequest.method = URLRequestMethod.POST;

//Assing the variable names  
//Build the variable  
var phpVars:URLVariables = new URLVariables();

//Building the loader  
var phpLoader:URLLoader = new URLLoader();  
phpLoader.dataFormat = URLLoaderDataFormat.VARIABLES;

//Variables ready for sending  
phpVars.email = email.text;  
phpVars.password = password.text;

phpLoader.load(phpFileRequest);

phpLoader.addEventListener(Event.COMPLETE, showResult);

function showResult (event:Event):void {

statusTxt.text = “” + event.target.data.systemResult;  
trace(event.target.data.systemResult);

}

var mybutton:Button = new Button();  
mybutton.toggle = true;  
mybutton.x = 125;  
mybutton.y = 110;  
mybutton.width = 21;  
mybutton.height = 11;  
mybutton.label = “Send”;  
mybutton.buttonMode = true;  
addChild(mybutton);

var tf:TextFormat = new TextFormat();  
tf.font = “Arial”;  
tf.size = 16;  
tf.color = 0x000000;

var ti:TextInput = new TextInput();  
ti.x = 93.35;  
ti.y = 73.35;  
ti.width = 172.00;  
ti.height = 22.00;  
ti.editable = true;  
ti.enabled = true;  
ti.setStyle(“textFormat”, tf);  
addChild(ti);

var tp:TextInput = new TextInput();  
tp.x = 95.35;  
tp.y = 121.90;  
tp.width = 172.00;  
tp.height = 22.00;  
tp.displayAsPassword = true;  
tp.editable = true;  
tp.enabled = true;  
tp.setStyle(“textFormat”, tf);  
addChild(tp);
