-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanagerdel.php
More file actions
89 lines (87 loc) · 2.49 KB
/
managerdel.php
File metadata and controls
89 lines (87 loc) · 2.49 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><style>article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio[controls],canvas,video{display:inline-block}[hidden],audio{display:none}mark{background:#FF0;color:#000}</style>
<style type="text/css" media="print">
@page
{
size: auto; /* auto is the initial value */
margin: 0mm; /* this affects the margin in the printer settings */
}
</style>
<script type="text/javascript" src="http://static.tumblr.com/p2evvtm/Wycm17d1m/tumblr_search_box.js"></script>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title> Select Option </title>
<link rel="stylesheet" href="css/ret.css">
</head>
<body>
<header>
<h1>Delete Details</h1>
</header>
<br />
<h2>Delete Manager Details on basis of:</h2>
<br />
<center>
<form method="POST" #action="http://www.google.com/search">
<table>
<tr>
<td><input type="radio" name="manid" > Manager ID </td>
<td><input type="radio" name="manname" > Manager Name </td>
</table>
<br />
<div style="border:2px dotted blue;padding:4px;width:15em;">
<table border="0" align="center" cellpadding="0">
<tr><td>
<input type="text" name="MID" size="25" style="color:#808080;" maxlength="255" placeholder="Search by ID or Name"/>
<input type="submit" value="Go!" />
</td></tr>
</table>
</div>
</form>
</center>
<br />
<br /><br />
<br /><br/>
<article>
<?php
$con = mysql_connect("localhost","root","");
if(!$con)
{
die("Connection Failed");
}
if(!(mysql_select_db("medical_inventory", $con)))
{
die ("Database Not Selected");
}
if (isset($_POST['manid']) && isset($_POST['manname']))
{
header("Location:managerdel.php");
}
else if(isset($_POST['MID']) && isset($_POST['manid']))
{
//echo "1";
$query = "DELETE FROM managed WHERE MID=".$_POST['MID'].";";
}
else if(isset($_POST['MID']) && isset($_POST['manname']))
{
$query = "DELETE FROM managed WHERE Fname LIKE '%".$_POST['MID']."%' OR Mname LIKE '%".$_POST['MID']."%' OR Lname LIKE '%".$_POST['MID']."%'";
}
if (isset ($query))
{
//echo "1";
$sql = mysql_query($query,$con);
}
if (isset($sql))
{
echo ("<br /><br /><br /><br /><aside><h1>Details Deleted Sucessfully</h1></aside>");
}
else
{
echo ("<br /><br /><br /><br /><aside><h1>Could not delete data</h1></aside>");
}
?>
</tbody>
</table>
</article>
</body>
</html>