-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathb_account.php
More file actions
37 lines (31 loc) · 753 Bytes
/
Copy pathb_account.php
File metadata and controls
37 lines (31 loc) · 753 Bytes
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
<?php
session_start();
if( !isset( $_SESSION['email']) ){
echo "You are not authorized to view this page. Go back <a href= '/'>home</a>";
exit();
}
require 'b_header.php';
require 'b_db_key.php';
?>
<body>
<nav class="navbar navbar-expand-sm bg-light mb-4">
<!-- Links -->
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="b_logout.php">Logout</a>
</li>
</ul>
</nav>
<h1>Welcome to the Account Page, <?php echo $_SESSION['email'] ?></h1>
<?php
$email=$_SESSION['email'] ;
echo $_SESSION['email'];
$sql = "SELECT * FROM buyer where email='$email'";
$conn=connect_db();
$result = $conn->query($sql);
$row = $result->fetch_assoc();
$uid = $row["uid"];
echo $uid;
?>
</body>
</html>