-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcustomer.php
More file actions
116 lines (103 loc) · 4.61 KB
/
customer.php
File metadata and controls
116 lines (103 loc) · 4.61 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bankaza Bank | History</title>
<link rel="icon" href="./img/icon_bank.png">
<script src="https://kit.fontawesome.com/50b1d2491c.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="style1.css">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
</head>
<body>
<div class="containe">
<!----------NAVIGATION BAR---------->
<div class="navigatio">
<div class="logo">
<img src="./img/icon_bank.png" alt="logo" style="height: 30px;">
Bank<span class="logo-hlt">aza</span> Bank
</div>
<nav>
<ul>
<li>
<a href="index.html" class="text-decoration-none">Home</a>
</li>
<li>
<a href="#" class="text-decoration-none">About</a>
</li>
<li>
<a href="customer.php" class="text-decoration-none">Customers</a>
</li>
<li>
<a href="#footer" class="text-decoration-none">Contacts</a>
</li>
</ul>
</nav>
</div>
<?php
echo '<h1 class="intro" style="letter-spacing: 2px; font-weight: bold;"><center>Customer Details</center></h1>';
echo '<table class="listtable table-light table table-striped table-hover mt-2" style="opacity: 0.9; width: 80%; margin: auto;">
<tr class="table-dark">
<th>ID</th>
<th>Name</th>
<th>E-mail</th>
<th>Balance (in ₹)</th>
</tr>';
$server = "localhost";
$username = "root";
$password = "";
$database = "bank_system";
// Create a database connection
$con = mysqli_connect($server, $username, $password, $database);
// Check for connection success
if(!$con){
die("connection to this database failed due to" . mysqli_connect_error());
}
$sql = "SELECT id,Name,email,balance FROM customer;";
$sql1 = "SELECT Name FROM customer;";
// Execute the query
$result=mysqli_query($con,$sql);
while($row=mysqli_fetch_array($result)){
// var_dump($row);
echo '<tr>
<td>'.$row["id"].'</td>
<td>'.$row["Name"].'</td>
<td>'.$row["email"].'</td>
<td>'.$row["balance"].'</td>
</tr>';
}
echo'</table>';
?> <br>
<hr/>
<h1 class="text-center font-weight-bold mb-5"><img src="./img/coin.png"> Transfer Money <img src="./img/coin.png"></h1>
<form action="select.php" method="POST" style="text-align:center">
<label class="choose" style="color: #111; font-size: 1rem; font-weight: 500;">Customer Name (Sender): </label>
<select id="cus" name="cus" style="width: 18%; height: 26px; margin-left: 8px;">
<?php $result1=mysqli_query($con,$sql1); ?>
<?php while($row1=mysqli_fetch_array($result1)):; ?>
<option value="<?php echo $row1[0]; ?>">
<?php echo $row1[0]; ?>
</option>
<?php endwhile ;
$con->close();
?>
</select><br>
<div>
<button class="btn btn-info btn-sm col-lg-2" style="margin-top:20px;">Select</button>
</div>
</form>
<br><br>
</div>
<!----------Footer---------->
<footer id="footer">
<p>© Copyright 2021 <span class="footer_logo">Bankaza Bank</span></p>
<div class="social-icon">
<a href="https://www.linkedin.com/in/reddykumaraswamy"><i class="fab fa-linkedin-in"></i></a>
<a href="mailto: reddy.kumaraswamy15@gmail.com"><i class="fas fa-envelope"></i></i></a>
<a href="#"><i class="fas fa-phone"></i></a>
</div>
</footer>
</body>
</html>