-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdashboard.php
More file actions
30 lines (30 loc) · 868 Bytes
/
dashboard.php
File metadata and controls
30 lines (30 loc) · 868 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
<?php
require_once 'function/db.php';
session_start();
if(empty($_SESSION['user'])) {
header('location: login.php');
}
$user = $_SESSION['user'];
$stmt = $conn->prepare("SELECT * FROM users WHERE user = :user");
$stmt->bindParam(':user', $user);
$stmt->execute();
$fetch = $stmt->fetch();
?>
<!DOCTYPE html>
<html lang="fa">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Account System</title>
<link rel="stylesheet" href="assets/style.css" />
</head>
<body>
<div class="box">
<h2>سلام <?php echo $fetch['user']; ?></h2>
<p>نام کاربری: <b><?php echo $fetch['user']; ?></b></p>
<p>ایمیل: <b><?php echo $fetch['email']; ?></b></p>
<p>شناسه: <b><?php echo $fetch['id']; ?></b></p>
<a href="logout.php">خروج</a>
</div>
</body>
<html>