-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit.php
76 lines (60 loc) · 2.81 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
<?php
include("header.php");
include("connect.php");
if(isset($_GET['id'])) {
$id = $_GET['id'];
$sql = mysqli_query($dbhandle,"SELECT * FROM users WHERE id = {$id}");
while ($data = mysqli_fetch_array($sql)) {
// echo $data['name'];
?>
<html>
<body>
<div class="container">
<div id="loginbox" style="margin-top:50px;" class="mainbox col-md-12">
<div class="panel panel-info" >
<div class="panel-heading">
<div class="panel-title">Edit</div>
</div>
<div style="padding-top:30px" class="panel-body" >
<div style="display:none" id="login-alert" class="alert alert-danger col-sm-12"></div>
<form action="edit_action.php" method="post">
<div>Name</div>
<div style="margin-bottom: 25px" class="input-group">
<input id="name" type="text" class="form-control" name="name" value="<?php echo $data['name']; ?>" placeholder="name">
<input id="id" type="hidden" class="form-control" name="id" value="<?php echo $data['id']; ?>" placeholder="name">
</div>
<div>Username</div>
<div style="margin-bottom: 25px" class="input-group">
<input id="username" type="text" class="form-control" name="username" value="<?php echo $data['username']; ?>" placeholder="username">
</div>
<div>IC Number</div>
<div style="margin-bottom: 25px" class="input-group">
<input id="ic_no" type="text" class="form-control" name="ic_no" value="<?php echo $data['ic_no']; ?>" placeholder="ic_no">
</div>
<div>Email</div>
<div style="margin-bottom: 25px" class="input-group">
<input id="email" type="text" class="form-control" name="email" value="<?php echo $data['email']; ?>" placeholder="email">
</div>
<div>User Level</div>
<select name="user_level">
<option value="1">Pengurus</option>
<option value="2">Ahli</option>
</select>
<div style="margin-top:10px" class="form-group">
<!-- Button -->
<div class="col-sm-12 controls">
<button type="submit" id="btn-update" name="btn-updatee" class="btn btn-success pull-right"><span class="glyphicon glyphicon-check"></span> Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div> <!-- /container -->
<script src="js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>
<?php
}
}
?>