-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patha_up.php
126 lines (102 loc) · 2.38 KB
/
a_up.php
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
<?php
$host = "localhost";
$user = "root";
$password = "";
$db = "ocr";
$con = new mysqli($host ,$user, $password, $db);
session_start();
if(empty($_SESSION['id']))
{
header("Location: lgn.php");
die("Redirecting to Login");
}
$aid = $_POST['aid'];
?>
<!DOCTYPE html>
<html>
<style>
input, select {
font-size: 15px;
width: 14%;
padding: 8px 20px;
margin: 2px 0;
border: 3px solid gray;
border-radius: 12px;
border-bottom: 2px solid blue;
background-color: #3CBC8D;
color: black;
-webkit-transition: width 0.4s ease-in-out;
transition: width 0.4s ease-in-out;
}
select:focus {
width: 25%;
border: 3px solid #555;
background-color: MediumAquaMarine;
}
input[type=submit]{
font-size: 20px;
font-family: franklin gothic;
padding: 5px 5px;
border: 3px solid gray;
border-radius: 12px;
width: 8%;
background-color: blue;
-webkit-transition: width 0.4s ease-in-out;
transition: width 0.4s ease-in-out;
cursor: pointer;
}
input:focus[type=submit]{
width: 16%;
border: 3px solid #555;
background-color: LightSeaGreen;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
width: 10%;
}
</style>
</head>
<body style="background-color:darkred;">
<img src="CUET_logo.png" alt="cuet logo" width="104" height="142">
<h1 style="
text-align:center;
border:5px solid black;
border-radius: 8px;
padding: 12px;
margin: 50px;
font-size:40px;
font-family:impact;
color:lightblue;
">Update Advisor Data</h1>
<br> <br>
<form
style="text-align:center; color: Chartreuse;"
action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"
target="_self"
method="POST"
>
ID: <?php echo $aid;?><br><br>
<input type="number" name="aid"><br>
Password:<br>
<input type="text" name="aps"><br>
Name:<br>
<input type="text" name="anm"><br>
Admin ID:<br>
<input type="number" name="amid"><br>
<input type="submit" name="sub" value="Update">
</form>
<?php
if (isset($_POST['sub']))
{
$a = $_POST['aps'];
$b = $_POST['anm'];
$c = $_POST['amid'];
$sql= "UPDATE advisor SET av_pass='$a', av_name = '$b', am_id = '$c' WHERE av_id='$aid'";
$result = $con->query($sql);
header('location: admin.php');
}
?>
</body>
</html>