Hi,
As you might remember I wrote code here to save a customer registration form to a database. Now what I want to do is retrieve the saved information, this is the php code:
I tried to follow the steps here! However, it is not working. In the flash project I have:PHP Code://select user record where username and password matches
$query = "select * from Customers where Username='$username'AND Password='$password'";
if (!($result = mysql_query($query))){ //if query fails echo message and exit
echo 'authenticated=queryFailed';
exit;
}
if ($row = mysql_fetch_array($result)) {
$cid = $data['cid'];
$fname = $data['fname'];
$lname = $data['lname'];
$snum = $data['snum'];
$sname = $data['sname'];
$suburb = $data['suburb'];
$pcode = $data['pcode'];
$country = $data['country'];
$phone = $data['phone'];
$email = $data['email'];
}
Thanks,Code:function sendData(event:MouseEvent):void { var url:String = "http://localhost/flash/dynamicWebsite/custLogin.php"; var req:URLRequest = new URLRequest(url); req.method = URLRequestMethod.GET; req.data = variables; tiCustomerID.text = variables.cid; tiFName.text = variables.fname; tiLName.text = variables.lname; tiSNum.text = variables.snum; tiSName.text = variables.sname; tiSuburb.text = variables.suburb; tiPCode.text = variables.pcode; tiCountry.text = variables.country; tiPhone.text = variables.phone; tiEmail.text = variables.email; tiUser.text = variables.user; tiPassword.text = variables.upassword; //Send data to php script Dataloader.load(req); }
Nightwalker




Reply With Quote