-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategory_removed.php
More file actions
41 lines (39 loc) · 1.02 KB
/
category_removed.php
File metadata and controls
41 lines (39 loc) · 1.02 KB
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
40
41
<?php
require_once 'db_connect.php';
session_start();
if(!$_SESSION['name'])
{
header("Location:login.php");
}
?>
<!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" />
<title>Untitled Document</title>
<style type="text/css">
</style>
<link href="admin_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h2> </h2>
<?php
$cat=$_POST['category'];
$qry=mysql_query("DELETE FROM category WHERE category='$cat'", $con);
if(!$qry)
{
echo "</br><a href='administration.php' target='_self'>Back to Administration<<</a>";
die("Query Failed: ". mysql_error());
}
else
{
echo "<br/>";
echo "Category ".$cat." removed Successfully";
echo "<br/>";
echo "</br><a href='administration.php' target='_self'>Back to Administration<<</a>";
}
?>
<a href="administration.php" target="_self">Back to Administration</a>
<?php mysql_close($con); ?>
</body>
</html>