-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtransferMoney.php
More file actions
88 lines (76 loc) · 3.43 KB
/
transferMoney.php
File metadata and controls
88 lines (76 loc) · 3.43 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Transfer Money</title>
</head>
<body background="bkgimg.jpg" class="bg">
<!-- Navbar -->
<?php include 'navbar.php' ?>
<!-- Connection to database -->
<?php
include 'dbconnect.php';
?>
<div class="container-fluid">
<div class="container text-center">
<form action="transfer.php" class="py-5" method="POST" id="transfer">
<div class="row px-5">
<div class="col-6">
<label for="from_lst">Transfer From</label><br>
<select class="btn btn-secondary my-3 px-3" name="from_lst" id="from_lst" form="transfer">
<option value="" disabled hidden selected>Select sender</option>
<?php
$sql = "SELECT * FROM customers";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$val = $row["accoun_no"];
echo '<option value="' . $val . '">' . $row["account_no"] . ':' . $row["name"] . '</option>';
?>
<?php
}
} else {
echo 'No customers.';
} ?>
</select>
<br>
<label for="from">Confirm Sender</label><br>
<input type="text" name="from" id="from">
</div>
<div class="col-6">
<label for="to_lst">Transfer To</label><br>
<select class="btn btn-secondary my-3 px-3" name="to_lst" id="to_lst" form="transfer">
<option value="" disabled hidden selected>Select receiver</option>
<?php
$sql = "SELECT * FROM customers";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
$val = $row["accoun_no"];
echo '<option value="' . $val . '">' . $row["account_no"] . ':' . $row["name"] . '</option>';
?>
<?php
}
} else {
echo 'No customers.';
} ?>
</select>
<br>
<label for="to">Confirm Receiver</label><br>
<input type="text" name="to" id="to">
</div>
</div>
<div class="py-5">
<label for="amount">Transfer Amount</label><br>
<input type="number" id="amount" name="amount">
</div>
<button class="btn btn-primary" type="submit">
Make Transfer
</button>
</form>
</div>
</div>
</body>
</html>