-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadminediter.php
More file actions
118 lines (96 loc) · 2.59 KB
/
Copy pathadminediter.php
File metadata and controls
118 lines (96 loc) · 2.59 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
<?php
session_start();
$connection = mysqli_connect("localhost","root","","bankaccount");
$database = mysqli_select_db($connection,"bankaccount");
$id=$_SESSION['id'];
$sql="SELECT * FROM banktable WHERE id='$id'";
$result=mysqli_query($connection,$sql);
$row=mysqli_fetch_array($result);
if(isset($_POST["update"])){
$fullname = $_POST["fullname"];
$email = $_POST["email"];
$phone = $_POST["phone"];
$city = $_POST["city"];
$country = $_POST["country"];
$zipcode = $_POST["zipcode"];
$address = $_POST["address"];
$query = "UPDATE banktable SET fullname = '$fullname', email = '$email', phone = '$phone', city = '$city', country = '$country', zipcode = '$zipcode', address = '$address' WHERE id = '$id'";
$result = mysqli_query($connection,$query);
?>
<script type="text/javascript">
alert("Update Successfull.");
window.location = "editconnectedusers.php";
</script>
<?php
}
?>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width,scalable=no">
<style>
#hide{
display: block;
}
#full{
width: 200px;
height: 30px;
text-align: center;
}
select {
width: 200px;
height: 30px;
}
#upd{
width: 200px;
height: 30px;
}
#up{
margin: 10em 15em;
padding: 4em;
}
h2{
font-family: 'Montserrat', sans-serif;
font-weight: bold;
padding: 0px 5em;
}
@media all and (max-width: 580px){
#up{
margin: 1em auto;
width: 100%;
height: 100%;
line-height: 2em;
font-size: 3em;
}
#full{
width: 100%;
height: 3em;
font-size: 0.6em;
}
#upd{
font-size: 0.6em;
}
h4{
text-align: center;
display: block;
font-size: 0.9em;
}
}
</style>
</head>
<body>
<div id="up">
<h4>ADMIN EDIT USER</h4>
<form action="adminediter.php" method="POST">
<input name="fullname" id="full" value="<?php echo @$row["fullname"]; ?>">
<input name="email" id="full" value="<?php echo @$row["email"]; ?>">
<input name="phone" id="full" value="<?php echo @$row["phone"]; ?>">
<input name="city" id="full" value="<?php echo @$row["city"]; ?>">
<input name="country" id="full" value="<?php echo @$row["country"]; ?>">
<input name="zipcode" id="full" value="<?php echo @$row["zipcode"]; ?>">
<input name="address" id="full" value="<?php echo @$row["address"]; ?>"><br>
<input type="submit" id="upd" name="update" value="update">
</form>
</div>
</body>
</html>