-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
174 lines (128 loc) · 5.51 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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?php
session_start();
?>
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<!-- External CSS -->
<link rel="stylesheet" href="style.css">
<title>Mark's Bank </title>
</head>
<body>
<!--nevbar-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="index.php">Mark's Bank</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class=" collapse navbar-collapse justify-content-end" id="navbarNavAltMarkup">
<div class="navbar-nav ml-auto pr-3">
<a class="nav-link active" aria-current="page" href="index.php">Home</a>
<a class="nav-link" href="#"> Money Transfer </a>
<a class="nav-link" href="history.php"> Transactions History </a>
<a class="nav-link" href="contact.php">Contact </a>
</div>
</div>
</div>
</nav>
<!-- Background Image -->
<div class="backimg">
<img src="images/back.jpg" class="img-fluid" alt="Mark's Bank">
</div>
<!-- Transaction Money Form -->
<div class="container">
<div class="row">
<div class="col">
<div class="card border-success mx-4 my-1 " style="max-width: 19rem;">
<div class="card-header bg-transparent border-denger text-center "><h4>Money Transfer</h4></div>
<div class="card-body text-success">
<form method="post" >
<div class="mb-3">
<label for="user1" class="form-label">Select User</label>
<select class="form-select" aria-label="Default select example" name="user1">
<option selected > Debtors users </option>
<option value="Mayur Patil">Mayur patil</option>
<option value="Nelson Carter">Nelson Carter</option>
<option value="Jamie Stephens">Jamie Stephens</option>
<option value="Harley Bates">Harley Bates</option>
<option value="Harper Watts">Harper Watts</option>
<option value="Michael Eland">Michael Eland</option>
<option value="Stewart Tyler">Stewart Tyler</option>
<option value="Philip Wood">Philip Wood</option>
<option value="Nelson Pierce">Nelson Pierce</option>
<option value="Eden Baker">Eden Baker</option>
<option value="Sylvester Paul">Sylvester Paul</option>
<option value="Jerome Turner">Jerome Turner</option>
<option value="Perry Geis">Perry Geis</option>
</select>
</div>
<div class="mb-3">
<label for="user2" class="form-label">Select User</label>
<select class="form-select" aria-label="Default select example" name="user2">
<option selected >Creditors Users</option>
<option value="Mayur Patil">Mayur patil</option>
<option value="Nelson Carter">Nelson Carter</option>
<option value="Jamie Stephens">Jamie Stephens</option>
<option value="Harley Bates">Harley Bates</option>
<option value="Harper Watts">Harper Watts</option>
<option value="Michael Eland">Michael Eland</option>
<option value="Stewart Tyler">Stewart Tyler</option>
<option value="Philip Wood">Philip Wood</option>
<option value="Nelson Pierce">Nelson Pierce</option>
<option value="Eden Baker">Eden Baker</option>
<option value="Sylvester Paul">Sylvester Paul</option>
<option value="Jerome Turner">Jerome Turner</option>
<option value="Perry Geis">Perry Geis</option>
</select>
</div>
<div class="mb-3">
<label for="amount" class="form-label">Amount</label>
<input type="number" class="form-control" id="amount" name="amount">
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="check1">
<label class="form-check-label" for="check" name="">Send Money </label>
</div>
</div>
<div class="card-footer bg-transparent border-success mx-auto "><button type="submit" class="btn btn-primary" name="submit">Continue</button>
</form></div>
</div>
</div>
<!
-- Databse Connectivity -->
<?php
include 'dbcon.php';
if (isset($_POST['submit'])) {
$user1= $_POST['user1'];
$user2= $_POST['user2'];
$amount= $_POST['amount'];
$insertq= "insert into transactions (user1, user2, amount) values('$user1',
'$user2','$amount')";
$result = mysqli_query($con , $insertq);
if ($result){
echo " <br/> <br/> Transaction complete :) ";
}else{
echo"Transaction not completed";
}
}
?>
<!-- Footer -->
<footer>
<nav class="navbar fixed-bottom navbar-dark bg-dark">
<div class="container-fluid justify-content-center ">
<a class="navbar-brand text-center footertxt" href="#">
<h6> Copyright @ 2021 Mark's Bank From The Sparks Foundation </h6>
</a>
</div>
</nav>
</footer>
<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</body>
</html>