Hi Guys
Please help me out on this. I have a flash gui that I need to integrate with a db. I am tring to save info to a db and get a respone on whether a cellular number exists in the database already.
This is my as2 code
myVars = new LoadVars();
myVars.fname = _global.fullname;
myVars.dob = _global.DOB;
myVars.cell = _global.cellular;
myVars.nwork = _global.network;
myVars.gn = _global.gameNumber;
myVars.mm = _global.myMonth;
myVars.dd = _global.myDay;
myVars.rr = _global.randomnumber;
myVars.td = _global.curdate;
myVars.ref = _global.ref;
myVars.sendAndLoad("post.php", myVars, 'POST');
myVars.onLoad = function() {
if (_root.toFlash == "1") {
_root.gotoAndStop(17);
} else {
_root.gotoAndStop(19);
}
}
and this is my php code
echo $_GET[fname];
echo $_GET[dob];
echo $_GET[cell];
echo $_GET[nwork];
echo $_GET[gn];
echo $_GET[mm];
echo $_GET[dd];
echo $_GET[rr];
echo $_GET[td];
echo $_GET[ref];
$fullno = (strval($_GET[mm]).strval($_GET[dd]).strval($_GET[rr]));
echo $fullno;
mysql_select_db("arrowsmtn", $connArrows);
//check to see if the cell number is used already
$search = "SELECT member_cellular FROM tbl_members WHERE member_cellular='$_GET[cell]'";
$result = mysql_query($search) or die ('SQL Error: '. mysql_error());
if (mysql_num_rows($result) == "1")
{
$toFlash = "1";
echo $toFlash;
}
else
{
$sql="INSERT INTO tbl_members (member_fullname, member_dob, member_cellular, member_network, member_regDate, member_regGame, member_fullMemNo, member_ref)
VALUES ('$_GET[fname]','$_GET[dob]','$_GET[cell]','$_GET[nwork]','$_GET[td]','$_GET[gn]','$fullno','$_GET[ref]')";
}
I am not getting any response. If the number is not existing then it does capture to the db but I am not getting a load of if its existing.
Please help urgently on this one. Been puzzling for ages on it and cant see the light.
Rob