Ejemplo n.º 1
0
		<meta charset="utf-8" />
		
		<link rel="stylesheet" href="styles.css" />

		<title>Potion Shop Inventory</title>
	</head>
	
	<body>
		<h1>Potion Shop Inventory</h1>
		<?php 
# Check for success message trigger and display accordingly
if (isset($_GET["success"])) {
    switch ($_GET["success"]) {
        case "add":
            echo "<p class='success-add'>Potion added successfully.</p>";
            break;
        case "delete":
            echo "<p class='success-delete'>Potion removed successfully.</p>";
            break;
        case "edit":
            echo "<p class='success-edit'>Potion updated successfully.</p>";
            break;
    }
}
$myShop = new PotionShop();
# Instantiate an Object using our PotionShop Class
$myShop->displayPotions();
# Call the displayPotions method through the new Object
?>
	</body>
</html>