I am creating a user login system using Flex, and I am having
trouble getting it to add a new row when someone tries to register.
The username and password is sent to the database and a new row is
created, but the row that was created is blank. Therefore, when the
person tries to login, the username and password isn't recognized.
I think the problem is somewhere in my Flex code and not the
database or PHP. Here is the code that calls that database:
I advise against declaring your request in mxml and binding
in the values. It is just too hard to debug.
Cerate the request object in the AS function in which you
will invoke send. That way you can examine your data to make sure
it is what you expect.
It will look something like this:
var sUserName:String = username.text;
var sPassword:String = password.text;
trace("sUserName=" + sUserName+ ", sPassword=" + sPassword)
var oRequest:Object =
I use http services that look like that all the time, and
they work fine. Are you positive the problem is with your flex, and
not your php? Try using Microsoft Network Monitor (free download)
to look at the post data being sent by flex. If the variables are
being sent properly your problem is in php or mysql. If not, the
data in the post request may help you figure out what is