-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathcheck_blc.php
150 lines (124 loc) · 5.97 KB
/
check_blc.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="180x180" href="statics/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="statics/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="statics/favicon-16x16.png">
<link rel="manifest" href="statics/site.webmanifest">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<title>Check Balance - Sparks Bank</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body style="background-color:#212529;">
<?php include 'spin.php'; ?>
<style>
.nav-link:hover {
text-decoration: underline;
}
</style>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed fixed-top"
style="font-family:candara; font-size:18px; box-shadow: 0px 0px 10px 0px black;">
<div class="container-fluid">
<a href="index.php"><img src="statics\logo.png" alt=""
style="height: 80px; margin-left:25px; margin-top:10px;"></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<b>
<ul class="navbar-nav ">
<li class="nav-item nav-links" style="margin-left:15px;">
<a class="nav-link text-nowrap" aria-current="page" href="index.php">Home</a>
</li>
<li class="nav-item" style="margin-left:15px; ">
<a class="nav-link text-nowrap" href="send_money.php">Send Money</a>
</li>
<li class="nav-item" style="margin-left:15px;">
<a class="nav-link text-nowrap" href="all_cust.php">View All Customers</a>
</li>
<li class="nav-item" style="margin-left:15px;">
<a class="nav-link text-nowrap" href="transactions.php">Transactions</a>
</li>
<li class="nav-item" style="margin-left:15px;">
<a class="nav-link text-nowrap" href="contact_us.php">Contact Us</a>
</li>
<li class="nav-item" style="margin-left:15px; margin-right:75px;">
<a class="nav-link text-nowrap" href="about_us.php">About Us</a>
</li>
</ul>
</b>
</div>
</nav>
<style>
.formin {
border-radius: 20px;
width: 380px;
height: 50px;
padding: 5px 5px 5px 15px;
}
.mybtn {
margin-bottom: 10px;
box-shadow: 2px 2px 10px black;
border-radius: 30px;
font-weight: bold;
color: white;
}
.mybtn:active {
background-color: black;
color: white;
}
</style>
<center>
<div class="container" style="margin-top: 10%; padding:10px 80px 10px 80px; ">
<div
style="width:80%; background-color:rgba(0,0,0,.5); padding:5px 5px 5px 5px; border-radius:30px; box-shadow: 2px 2px 10px gray;">
<h1 style=" color:white;">Check Account Balance</h1>
</div>
<div class="container"
style=" backdrop-filter: blur(5px); border-radius:5px; padding: 20px 20px 20px 20px; margin-top:50px; width:60%;">
<form action="check_blc.php" method="post">
<input type="text" class="formin form-control" name="accno" id="" placeholder="Account Number"><br>
<br><input class="btn mybtn btn-outline-light" type="submit" value="Submit"><br><br>
<p style="color:white;">Don't remember your account number? check <a href="all_cust.php">here</a>
</p>
</form>
</div>
</div>
<?php
$conn = mysqli_connect($servername, $username, $password, $database);
if(!$conn){
die("Connection not established: ".mysqli_connect_error());
}else{
if($_SERVER['REQUEST_METHOD']== 'POST'){
$accno = $_POST['accno'];
$sql = "SELECT blc FROM users where accno='$accno'";
$result = mysqli_query($conn, $sql);
if($result){
echo '<div class="alert alert-success align-items-center text-center" style="width:25%;" role="alert">
<h2> <i class="fas fa-rupee-sign" aria-hidden="true"></i>'.mysqli_fetch_assoc($result)['blc'].'</h2></div>';
}else{
echo '<div class="alert alert-danger align-items-center text-center" style="width:34%;" role="alert">
<div><h2>
<i class="fas fa-times-circle"></i>
Something went wrong!</h2>
</div>
</div>';
}
}
}
?>
</center>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous">
</script>
</body>
</html>