-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakeAdmin.php
More file actions
42 lines (31 loc) · 719 Bytes
/
Copy pathmakeAdmin.php
File metadata and controls
42 lines (31 loc) · 719 Bytes
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
<!-- Made By Atharva -->
<?php
$con = mysqli_connect("localhost","root","") or die ("Error Occures");
mysqli_select_db($con, "hospital_management_system") or die("Error Occures");
error_reporting(0);
$eid = $_POST["eid"];
if($_POST["submit"]) {
$sql = "INSERT INTO admin VALUES('$eid','$eid')";
if(mysqli_query($con, $sql)) {
echo "Success";
}
else {
echo "Error Occures";
}
}
else {
echo "Insert valid Employee ID";
}
?>
<html>
<head>
<title>Make Admin</title>
</head>
<body>
<h1 style="text-align:center">Make Admin</h1>
<form>
Employee ID:<input type="id" name="eid" required>
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>