-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_notice.php
More file actions
112 lines (96 loc) · 3.67 KB
/
add_notice.php
File metadata and controls
112 lines (96 loc) · 3.67 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
<?php
include("connect.php");
$status = "";
if (isset($_POST['notice_id']) && $_POST['notice_id'] == 1) {
$date = $_REQUEST['date'];
$notice = $_REQUEST['notice'];
$ins_query = "insert into notice
(date,notice)values
('$date','$notice')";
mysqli_query($con, $ins_query)
or die(mysqli_error($con));
$status = "Notice is added 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: 100px 350px;
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%;
}
</style>
</head>
<body>
<div class="myform">
<form name="form" method="post" action="">
<input type="hidden" name="notice_id" value="1" />
<br>
<h1 style="font-family: Algerian;" align="center">
New Notice
</h1>
<br>
<table>
<tr>
<td class="tabledata"> <label for="date">Date:</label></td>
<td class="tabledata"><input id="inputbox" type="date" name="date" required /></td>
</tr>
<tr>
<td class="tabledata"> <label for="notice">Notice:</label></td>
<td class="tabledata"><input id="inputbox" type="text" name="notice" placeholder="Enter your notice" required /></td>
</tr>
</table>
<br>
<p><input style=" margin:20px 130px; padding:10px 70px; " class="btn btn-lg btn-success" name="submit" type="submit" value="SUBMIT" /></p>
<p style="color:#FF0000;"><?php echo $status; ?></p>
</form>
</div>
</body>
</html>