I'm probably not adding the value from the first form correctly. The page reloads and the "PlayID" variable in the address bar is empty. The value for the Item is passed correctly.
Here's how I'm adding the value to the hidden <input>:
<input type="hidden" value="<?php echo((isset($_POST["Player"]))?$_POST["Player"]:"") ?>" name="PlayID">
Chosen by dragging the Binding for the First form element to the page.
Obviously not right. . .
Code for the Add to Cart Behavior:
*****************************************
<?php
// WA eCart Trigger AddToCart
if (isset($_POST["ATC_Submit"])){
$cart = $sherwin1;
$ATC_itemID = "1";
$ATC_AddIfIn = 0;
$ATC_RedirectAfter = "mycart.php";
$ATC_RedirectIfIn = "";
$ATC_itemName = "";// column binding
$ATC_itemDescription = "";// column binding
$ATC_itemThumbnail = "";// column binding
$ATC_itemWeight = floatval("0");// column binding
$ATC_itemQuantity = floatval("".$_POST["sherwin1_1_Quantity_Add"] ."");// column binding
$ATC_itemPrice = floatval("0");// column binding
$ATC_itemPlayerID = floatval("".((isset($_POST["PlayID"]))?$_POST["PlayID"]:"") ."");// column binding
$ATC_itemItemID = floatval("".((isset($_POST["TO"]))?$_POST["TO"]:"") ."");// column binding
$ATC_itemQuantity = floatval($ATC_itemQuantity);
if (is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0) {
$cart->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemThumbnail, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice, $ATC_itemPlayerID, $ATC_itemItemID);
if ($ATC_RedirectAfter != "" && $cart->redirStr == "") {
$cart->redirStr = $ATC_RedirectAfter;
}
if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != "") {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'];
}
else {
$_SESSION['WAEC_ContinueRedirect'] = $_SERVER['PHP_SELF'];
}
}
}
?>
***************************************************************
Thanks,