";
$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 "displayShoppingList":
displayShoppingList();
break;
case "createNewShoppingList":
createNewShoppingList();
break;
}
}
displayShoppingList();
echo "