I figured out the last part of the question. I had the same name used in both tables. So I have that working now.
Next issue is: I have the add to cart button in a repeating table. It lists all of the accessories in a table. If I click the add to cart button it adds the model of the fist item and the quantity of all of the items. So if the first accessory is abc and there are 4 accessories listed. If I click on the last add to cart button(item xyz) it adds abc to the cart with quantity of 4
Here is the code for the add to cart
<table>
<?php do { ?>
<tr>
<td><table width="100%" border="0">
<tr>
<td valign="bottom" width="110px"><form name="related"><input type="checkbox" name="addtocart[]" id="addtocart" value="<?php echo $row_rsRelated['AccessoryItem']; ?>" align="top"/><a href="ProductsDetail.php?SKU=<?php echo $row_rsRelated['AccessoryItem']; ?>"><?php echo $row_rsRelated['AccessoryItem']; ?></a><input name="posted" type="hidden" value="1" /></form></td>
<td valign="bottom"><?php echo $row_rsRelated['short_description']; ?></td>
<td valign="bottom" width="120" align="right">$<?php echo $row_rsRelated['price']; ?></td>
<td><form name="WA_Store_Cart_2_ATC_<?php echo $row_rsRelated['AccessoryItem']; ?>" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>">
<input type="hidden" name="WA_Store_Cart_2_ID_Add" value="<?php echo $row_rsRelated['RelatedItem']; ?>" >
<input type="text" name="WA_Store_Cart_2_Quantity_Add" value="1" size="1" >
<input type="submit" value="Add to Cart" name="WA_Store_Cart_2_ATC">
</form></td>
</tr>
</table>
</td>
</tr>
<?php } while ($row_rsRelated = mysql_fetch_assoc($rsRelated)); ?>
</table>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_RelatedModel > 0) { // Show if recordset not empty ?>
<h2 style="background-color: #D3E1FB;width:680px;height:20px;padding-top:10px;"> Recommended models:</h2>
<?php do { ?>
<hr/>
<table>
<tr>
<td>
<form name="WA_Store_Cart_3_ATC_<?php echo $row_RelatedModel['ModelItem']; ?>" method="POST" action="<?php echo $_SERVER["PHP_SELF"]; ?><?php echo (isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] != "")?"?".$_SERVER["QUERY_STRING"]:""; ?>"><table width="100%" border="0">
<tr>
<td align="left" valign="bottom"><img src="<?php echo $row_RelatedModel['thumbnail']; ?>" height="50" width="50" /></td>
<td width="100" valign="bottom" ><input type="checkbox" name="addtocartmodel[]" id="addtocartmodel" value="<?php echo $row_RelatedModel['ModelItem']; ?>" align="top"/><a href="ProductsDetail.php?SKU=<?php echo $row_RelatedModel['ModelItem']; ?>"><?php echo $row_RelatedModel['ModelItem']; ?></a></td>
<td valign="bottom"><?php echo $row_RelatedModel['brand_name']; ?><br /><?php echo $row_RelatedModel['medium_description']; ?></td>
<td valign="bottom" align="right" width="100">$<?php echo $row_RelatedModel['price']; ?></td>
<td>
<input type="hidden" name="WA_Store_Cart_3_ID_Add" value="<?php echo $row_RelatedModel['ModelItem']; ?>" >
<input type="text" name="WA_Store_Cart_3_Quantity_Add" value="1" size="1" >
<input type="submit" value="Add to Cart" name="WA_Store_Cart_3_ATC">
</form></td>
</tr>
</table>
</td>
</tr>
</table>