create a button, and add to its event:
on (press) {
quantity=1;
itemid=1;
loadMovie("addtocart.php",'POST');
button._alpha=0;
}
with loadMovie you can communicate with a php program, and with POST.
After sending these value, create another page in flash, or delete the layer where you create this action.