/
DeleteRecipe.php
39 lines (37 loc) · 1.33 KB
/
DeleteRecipe.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<form action="DeleteRecipe.php" method="post" />
<title>Schema Creator</title>
</head>
<?php
function __autoload($class_name) {
include $class_name . '.php';
}
if (empty($_POST["name"]) && empty($_POST["description"]) && empty($_POST["image"]) && empty($_POST["url"])) {
echo 'Please Enter Recipe Information.';
} else {
$thing = new Recipe('', '', ''); //As Thing, the super parent class extends Tag. Tag construtor is invoked.
echo $thing->RemoveThing("name", $_POST["name"]);
//echo $thing->RemoveCreativeWork();
//echo $thing->RemoveRecipe();
echo 'Recipe Deleted Successfully.';
}
?>
<body>
<div style="border-style: outset; width: 450px" align="left">
<h2 align="center" style="color: red">Delete Recipe</h2>
<h5 style="color: red">
<h5>
<?php
$recipe = new Recipe();
$form = new FormGenerator();
$form->generate($recipe);
?>
<input type="submit" name="Check" title="Check" value="Delete Recipe" >
<h4><a href='index.php'>Home</a></h4></td>
</div>
</body>
</form>
</html>