";
$command = $_POST['command'];
if(isset($command))
{
switch($command)
{
case "addToList":
$productId = $_POST['productToAdd'];
addToList($productId);
break;
case "removeFromList":
$productId = $_POST['productToRemove'];
removeFromList($productId);
break;
case "printShoppingList":
printShoppingList();
break;
}
}
printShoppingList();
echo "