PHP and Flash disconnect (failure to communicate)

I have been working on a dynamic social membership site, using Adams tutorials (from DevelopPhp) to learn and apply that knowledge pretty directly. I have been following the web intersect tutorials specifically and am using a flash login area and, at least partially, a flash registration form that starts with sending users to paypal with an amount determined by there choices in that form. I need the information about what levels and types of membership they choose in the paypal form, to be posted to a mysql database, along with information gathered afterward from an html form. So, I am attempting to store the values as session variables to be carried to the next php page. The problem is that flash is not posting any values to these variables. (the information is sent to paypal, but doesn’t seem to play well with my php) When I check the database for information, The rows of flash info are blank spaces but the information that the html sends works appropriately.

<?php

if ($_POST[‘sendRequest’] == “parse”) {

$Membership = $_POST[‘Membership’];

$Level= $_POST[‘Level’];

$Spouse = $_POST[‘Spouse’];

$chiroid = $_POST[‘chiroid’];

$Level= $row[“Level”];

session_register(‘Level’);

$_SESSION[‘Level’] = $Level;

$chiroid = $row[“chiroid”];

session_register(‘chiroid’);

$_SESSION[‘chiroid’] = $chiroid;

$Spouse = $row[“Spouse”];

session_register(‘Spouse’);

$_SESSION[‘Spouse’] = $Spouse;

$Membership = $row[“Membership”];

session_register(‘Membership’);

$_SESSION[‘Membership’] = $Membership;

?>

the AS3 code I am using is:

function total() {

total_price=levelprice+memberprice+spouseprice;

trace(total_price);

}

submit_btn.addEventListener(MouseEvent.CLICK, addItem);

function addItem(event:MouseEvent):void {

if (chiroid_text.length==4) {

errormsg_text.text="";

}

if (Membership.selectedLabel==“Doctors of Chiropractic: $0.00”&&(chiroid_text.length!=4)) {

errormsg_text.text=“Please input your chiropractic ID”;

} else if (Membership.selectedLabel=="") {

errormsg_text.text=“Please choose a Type of Membership.”;

} else if ((Membership.selectedLabel==“Doctors of Chiropractic: $0.00”&&chiroid_text.length==4)||Membership.selectedLabel!=""||Membership.selectedLabel!=“Doctors of Chiropractic: $0.00”&&errormsg_text.text=="") {

if (total_price!=0) {

var url:String=‘https://www.paypal.com/cgi-bin/webscr’;

var request:URLRequest=new URLRequest(url);

var paypal:URLVariables = new URLVariables();

paypal.cmd=’_xclick-subscriptions’;

paypal.business=‘[email protected]’;

paypal.item_name=‘Membership’;

paypal.item_number=’’;

paypal.no_shipping=‘1’;

paypal.no_note=‘0’;

paypal.currency_code=‘USD’;

paypal.lc=‘US’;

paypal.bn=‘PP-SubscriptionsBF’;

paypal.a1=’’;

paypal.p1=’’;

paypal.t1=’’;

paypal.a2=’’;

paypal.p2=’’;

paypal.t2=’’;

paypal.a3=total_price;

paypal.p3=‘1’;

paypal.t3=‘Y’;

paypal.src=‘on’;

paypal.sra=‘1’;

paypal.srt=’’;

paypal.instanceName=‘submit_btn’;

paypal.shopping_url =(“register.php”);

request.data=paypal;

request.method=URLRequestMethod.POST;

navigateToURL(request, ‘_self’);

errormsg_text.text="";

mc_message.gotoAndStop(“10”);

mc_step.gotoAndStop(“10”);

gotoAndStop(“5”);

varLoader.dataFormat=URLLoaderDataFormat.VARIABLES;

varSend.method=URLRequestMethod.POST;

varSend.data=variables;

variables.Membership=Membership.selectedLabel;

if (Membership.selectedLabel==“Doctors of Chiropractic: $0.00”) {

variables.chiroid=chiroid_text.text;

} else {

variables.chiroid=“Non-Doctor”;

}

variables.Level=Level.selectedLabel;

if (spouse.selected==true) {

variables.Spouse=“Yes”;

} else {

variables.Spouse=“No”;

}

}

if (Membership.selectedItem.label!=“Doctors of Chiropractic: $0.00”) {

chiroid_text.text="";

Sobj.data.Membership=Membership.selectedItem.label;

Sobj.data.Spouse=“no”;

Sobj.data.Level=“non-doctor”;

Sobj.data.chiroid=“non-doctor”;

Sobj.flush();

} else {

Sobj.data.Membership=Membership.selectedItem.label;

if (Level.selectedItem.label!=“Basic $0.00”) {

if (spouse.selected=false) {

Sobj.data.Spouse=“no”;

} else {

Sobj.data.Spouse=“yes”;

}

}

Sobj.data.chiroid=“non-doctor”;

Sobj.data.Level=Level.selectedItem.label;

Sobj.flush();

}

}

if (total_price==0&&errormsg_text.text=="") {

mc_message.gotoAndStop(“10”);

var register:URLRequest=new URLRequest(“paypal.php”);

navigateToURL(register, ‘_self’);

}

Sobj.data.paypal=“yes”;

var variables:URLVariables = new URLVariables();

var varLoader:URLLoader=new URLLoader;

var varSend:URLRequest=new URLRequest(“paypal.php”);

varLoader.dataFormat=URLLoaderDataFormat.VARIABLES;

varSend.method=URLRequestMethod.POST;

variables.sendRequest=“parse”;

varSend.data=variables;

variables.Membership=Membership.selectedLabel;

if (Membership.selectedLabel==“Doctors of Chiropractic: $0.00”) {

variables.chiroid=chiroid_text.text;

variables.Level=Level.selectedLabel;

} else {

variables.chiroid=“Non-Doctor”;

variables.Level=“Non-Doctor”;

}

if (spouse.selected==true) {

variables.Spouse=“Yes”;

} else {

variables.Spouse=“No”;

}

}

Any help would be appreciated. I tried before starting the site, to test the writing capabilities of flash to php code and recieved no errors or issues, using the simple two way php communication tutorial file that Adam wrote (DevelopePhp).

If you think you can help try emailing me at [email protected] or skype me at eriksenservices.aaron