-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_admin.php
More file actions
145 lines (127 loc) · 5.16 KB
/
add_admin.php
File metadata and controls
145 lines (127 loc) · 5.16 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<?php
include("connect.php");
$status = "";
if (isset($_POST['admin_id']) && $_POST['admin_id'] == 1) {
$username = $_REQUEST['username'];
$email = $_REQUEST['email'];
$password = $_REQUEST['password'];
$fullName = $_REQUEST['fullName'];
$mobile = $_REQUEST['mobile'];
$type = $_REQUEST['type'];
$ins_query = "insert into admin
(`username`,`email`,`password`,`fullName`,`mobile`,`type`)values
('$username','$email','$password','$fullName','$mobile','$type')";
mysqli_query($con, $ins_query)
or die(mysqli_error($con));
$status = "Data is uploaded successfully.";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>add admin</title>
<link rel="stylesheet" href="css/style.css" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
<link href="fontawesome-free-6.4.0-web/css/all.css" rel="stylesheet">
<style>
body {
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-image: url('image/adminbg2.png');
background-repeat: no-repeat;
background-size: cover;
}
.myform {
color: #ffffff;
display: flex;
justify-content: center;
margin: 10px 300px;
background-color: #0c0c0c;
opacity: .8;
z-index: 1;
/* padding: 20px; */
width: 88%;
border-radius: 15px;
border: 1px solid #f3f1f1;
box-shadow: 10px 10px 30px #3e3e3e66;
}
.myform h1 {
padding-bottom: 10px;
padding-top: 10px;
}
.myform label {
font-size: 23px;
font-weight: 600;
letter-spacing: 1px;
font-family: poppins;
padding-left: 20px;
}
.tabledata {
padding-top: 10px;
padding-bottom: 10px;
padding-right: 60px;
}
#inputbox {
width: 80%;
}
.other-link a {
margin: 5px 30px;
text-decoration: none;
text-transform: uppercase;
padding: 13px 25px;
background-color: #198754;
color: white;
border-radius: 8px;
font-size: 19px;
transition: background-color 0.3s;
}
.other-link a:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<div class="myform">
<form name="form" method="post" action="">
<input type="hidden" name="admin_id" value="1" />
<h1 style="font-family: Algerian;" align="center">New Admin</h1></br>
<table>
<tr>
<td class="tabledata"> <label for="username">Username:</label></td>
<td class="tabledata"><input type="text" name="username" placeholder="Enter your Username" required /></td>
</tr>
<tr>
<td class="tabledata"> <label for="Email">Email:</label></td>
<td class="tabledata"><input type="text" name="email" placeholder="Enter your email" required /></td>
</tr>
<tr>
<td class="tabledata"> <label for="Password">password:</label></td>
<td class="tabledata"><input type="text" name="password" placeholder="Enter your password" required /></td>
</tr>
<tr>
<td class="tabledata"> <label for="fullname">fullname:</label></td>
<td class="tabledata"><input type="text" name="fullName" placeholder="Enter your fullname" required /></td>
</tr>
<tr>
<td class="tabledata"> <label for="mobile">Mobile:</label></td>
<td class="tabledata"><input type="number" name="mobile" placeholder="Enter your Mobile" required /></td>
</tr>
<tr>
<td class="tabledata"> <label for="type">Type:</label></td>
<td class="tabledata"><input type="text" name="type" placeholder="" required /></td>
</tr>
</table>
<p><input style=" margin:0px 30px; padding:10px 50px;" class="btn btn-lg btn-success" name="submit" type="submit" value="submit" />
<span class="other-link"><a href="admin_adminview.php">view records</a></span>
</p>
</form>
<p style="color:#FF0000;"><?php echo $status; ?></p>
</div>
</body>
</html>