-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
75 lines (44 loc) · 1.74 KB
/
index.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
<?php
include "connect.php";
session_start();
?>
<!DOCTYPE html>
<html lang = "en">
<head>
<title>Credit Management</title>
<meta charset = "utf-8">
<meta name = "viewport" content = "width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class = "jumbotron jumbotron-fluid">
<div class = "container">
<h1>Credit Management</h1>
<p>simulating credit transfer between users.<p>
</div>
</div>
<div class = "container">
<button data-toggle = "collapse" data-target = "#view_user" class = "btn btn-primary">View All User</button>
<br>
<form action = <?php echo htmlspecialchars("welcome.php");?> method = "get" class = "collapse" id = "view_user">
<div class = "form-group">
<label for = "user">Be a User</label>
<select class = "form-control" id = "user" name = "user_name">
<?php
$sql = "SELECT name from user";
$result = $conn->query($sql);
while($row = $result->fetch_assoc()){
echo "<option>".$row["name"]."</option>";
}
$conn->close();
?>
</select>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>
</div>
</body>
</html>