-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwallet.php
More file actions
39 lines (35 loc) · 1.2 KB
/
wallet.php
File metadata and controls
39 lines (35 loc) · 1.2 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
<?php
include_once('configuration.php');
session_start();
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
header("location: login.php");
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>wallet</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css">
<style type="text/css">
body{ font: 14px sans-serif; text-align: center; }
</style>
</head>
<body>
<div class="page-header" style="background-color: #90E1E1">
<h1>Hi, <b><?php echo htmlspecialchars($_SESSION["username"]); ?></b></h1>
</div>
<br><br><br><br>
<?php
$user = $_SESSION['username'];
$query = "SELECT * FROM users WHERE firstname ='" .$user."' ";
$result = mysqli_query($db,$query);
$row = mysqli_fetch_array($result);
$_SESSION['add_wallet'] =$row['wallet'];
echo '<div style="font-size:1.25em;color:#0e3c68;font-weight:bold;"> Money left in your wallet is : <span style="font-size:1.25em;color:#0e3c68;font-weight:bold;">'.$row['wallet'].'</span></div>';
?>
<br><br><br>
<a href="add.php" class="btn btn-success">add to money wallet</a>
</body>
</html>