-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit.php
89 lines (75 loc) · 1.33 KB
/
edit.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
<?php
include 'classes/users.php';
$users = new Users();
$id = $_GET['id'];
$getUser = $users->getUser($id);
if ($getUser == null) {
header("Location: index.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Edit</title>
<style type="text/css">
table {
border: 1px solid #000;
border-collapse: collapse;
margin-bottom: 20px;
}
table thead td {
background-color: #ccc;
}
table tr td{
border-bottom: 1px solid #000;
padding: 5px;
}
form {
max-width: 250px;
border: 1px solid #0044ee;
padding: 20px;
}
form div {
padding: 4px 0px;
}
div label {
display: block;
}
div input {
display: block;
padding: 6px;
width: 100%;
}
div button {
font-size: 24px;
}
</style>
</head>
<body>
<div>
<form method="post" action="actions/UserUpdateAction.php">
<div>
<label>First Name</label>
<input type="text"
value="<?=$getUser['first_name'];?>" name="first_name">
</div>
<div>
<label>Last Name</label>
<input type="text"
value="<?=$getUser['last_name'];?>" name="last_name">
</div>
<div>
<label>Phone</label>
<input type="text"
value="<?=$getUser['phone'];?>"
name="phone">
</div>
<div>
<input type="hidden" name="id"
value="<?=$getUser['id'];?>">
<button type="submit">Submit</button>
</div>
</form>
</div>
</body>
</html>