Sindbad~EG File Manager
<?php session_start();
$Username = $_GET['Username'];
if(is_null($Username))
header('Location: login.php');
require_once('query.php');
session_register($SitePassword);
$Username = $_GET[Username];
$deleteflag = !is_null($_GET['DeleteRecipe']);
if($deleteflag)
$RecipeId = $_GET['DeleteRecipe'];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Recipe Deleted</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
if($deleteflag)
{ // delete the recipe with RecipeId = $RecipeId
$sql = "SELECT * FROM Recipes WHERE RecipeId='$RecipeId';";
$q = Query($sql);
$q->fetchInto($row);
$RecipeName=$row[2];
$sql = "DELETE FROM Recipes WHERE RecipeId='$RecipeId';";
Query($sql);
echo "Your recipe for " , $RecipeName, " has been deleted. Now you could";
}
?>
<P> <A href="UploadRecipe.php?<?php echo "Username=$Username"?>">Upload a recipe </A></P>
<P> <A href="BrowseRecipes.php"> Browse all the recipes </A></P>
<P> <A href="BrowseRecipes.php?<?php echo "Username=" . $Username?>"> Browse or edit my recipes</P>
</body>
</html>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists