Basically I have index.php which loads the index.dwf movie.
In index.php I have a database query that gets the members information from the database. How can I get for example:
Their username into the index.swf action script I have for paypal?
Here is what I have so far does anyone have any suggestions?
INDEX.SWF
on (release) {
//create the LoadVars that will hold our paypal information
var paypal = new LoadVars();
addVariable("custom", "<?=$test?>");
//specify the business, amount of the item, shipping, etc.
paypal.cmd="_xclick";
paypal.business="ikonpr_1195618222_biz@gmail.com";
paypal.currency_code="USD";
paypal.amount="67.00";
paypal.item_name="The Black Book";
paypal.no_shipping="1";
paypal.return="http://www.theblackbook.us/purchase/success.php ";
paypal.cancel_return="http://www.theblackbook.us/purchase/cancel.php";
paypal.custom=_root.custom;
//send information to PayPal
paypal.send("https://www.sandbox.paypal.com/cgi-bin/webscr","POST");
}
INDEX.PHP
require_once('../connections/database.php');
error_reporting( E_ALL ); //-- FOR ERROR REPORTING //
// Passkey that got from link
$passkey=$_GET['passkey'];
$tbl_name1="registered_members";
// Retrieve data from table where row that match this passkey
$sql1="SELECT * FROM $tbl_name1 WHERE confirm_code ='$passkey' AND status='confirmed'";
$result1=mysql_query($sql1);
// If successfully queried
if($result1){
// Count how many row has this passkey
$count=mysql_num_rows($result1);
// if found this passkey in our database, retrieve data from table "registered_members"
if($count==1){
$meminfo = mysql_fetch_array($result1);
$test = $meminfo['confirm_code']; // GET confirm code from USER in database
//I want this field $test to show up as the custom variable in my flash actionscript for paypal.. PLEASE HELP
}
}