I have a unique ID for the item, this here is some of the code.
<?php
// WA eCart AddToCart
if (isset($_POST["eCart1_1_ATC"]) || isset($_POST["eCart1_1_ATC_x"])) {
$ATC_itemID = $_POST["eCart1_1_ID_Add"];
$ATC_AddIfIn = 0;
$ATC_RedirectAfter = "../purchases/OMC_Shoppingcart.php";
$ATC_RedirectIfIn = "";
if (isset($totalRows_Recordset1) && $totalRows_Recordset1 > 0) {
$row_Recordset1 = WAEC_findRecordMySQL($Recordset1, "ORDERID", $ATC_itemID);
if ($row_Recordset1) {
$ATC_itemName = "".$_POST["eCart1_1_NUMBER_Add"] ." of " ;// column binding
$ATC_itemDescription = "".$_POST["eCart1_1_NUMBER_Add"] ."";// column binding
$ATC_itemThumbnail = "";// column binding
$ATC_itemWeight = floatval("0");// column binding
$ATC_itemQuantity = "".$_POST["eCart1_1_Quantity_Add"] ."";// column binding
$ATC_itemPrice = "".$_POST["eCart1_1_Sale_Add"] ."";// column binding
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
}
$ATC_itemQuantity = floatval($ATC_itemQuantity);
if (is_numeric($ATC_itemQuantity) && $ATC_itemQuantity != 0) {
$eCart1->AddToCart($ATC_AddIfIn, $ATC_RedirectIfIn, $ATC_itemID, $ATC_itemName, $ATC_itemDescription, $ATC_itemThumbnail, $ATC_itemWeight, $ATC_itemQuantity, $ATC_itemPrice);
if ($ATC_RedirectAfter != "" && $eCart1->redirStr == "") {
$eCart1->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'];
}
}
}
?>
<form name="eCart1_1_ATC_<?php echo $row_Recordset1["ORDERID"]; ?>" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>">
<input type="hidden" name="eCart1_1_ID_Add" value="<?php echo $row_Recordset1["ORDERID"]; ?>" >
<input type="hidden" name="eCart1_1_SIZE_Add" value="<?php echo $row_Recordset1["PhotoSize"]; ?>" >
<input type="hidden" name="eCart1_1_NUMBER_Add" value="<?php echo $row_Recordset1["PhotoNumber"]; ?>" >
<input type="hidden" name="eCart1_1_Quantity_Add" value="<?php echo $row_Recordset1['PhotoQty']; ?>" >
<input type="hidden" name="eCart1_1_Sale_Add" value="<?php echo $row_Recordset2['ItemSalePrice']; ?>" >
<input type="image" src="../WA_eCart/Images/Pacifica/Btn5_EN_addtocart.gif" border="0" class="eC_ImageButton" value="Add to Cart" name="eCart1_1_ATC">
</form>