-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserInfo.php
More file actions
70 lines (58 loc) · 2.4 KB
/
userInfo.php
File metadata and controls
70 lines (58 loc) · 2.4 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
<?php
require ('includes/config.inc.php');
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Language"
content="język" />
<meta http-equiv="Content-Type"
content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name = "author" content = "Jan Gregor" />
<title>Informacje o Użytkowniku</title>
<link rel="Stylesheet" type= "text/css" href = "css/bootstrap.min.css" />
<link rel="Stylesheet" type= "text/css" href = "css/style.css" />
</head>
<body class="dark-theme || light-theme">
<header>
<?php
require_once "includes/header.inc.php"; ?>
</header>
<main>
<center><br><br><br>
<head><h2>Użytkownik: <?php echo $_SESSION['username']; ?></h2></head><br><br>
<div id="user_info" style="text-align: left; margin-left: 25%; margin-right: 20%; height: 589px;">
<?php
$sql = "SELECT * FROM users WHERE user_id = '".$_SESSION['userid']."';";
$results = mysqli_query($conn, $sql);
while($row = mysqli_fetch_array($results)) {
?><article><h4 id="info"></h4></article>
<b>Imię: </b><?php echo $row['first_name']; ?><br><br>
<b>Email: </b><?php echo $row['email']; ?><br>
<b>Nr tel.: </b><?php echo $row['phone']; ?><br><br>
<b>Województwo: </b><?php
$sql_v = "SELECT * FROM voivodeships WHERE voivodeship_id = '".$row['voivodeship_id']."';";
$results_v = mysqli_query($conn, $sql_v);
while($row_v = mysqli_fetch_array($results_v)) {
echo $row_v['voivodeship']; }?><br>
<b>Miasto: </b><?php
$sql_c = "SELECT * FROM cities WHERE city_id = '".$row['city_id']."';";
$results_c = mysqli_query($conn, $sql_c);
while($row_c = mysqli_fetch_array($results_c)) {
echo $row_c['city']; }?><br>
<br><br></div> <?php } ?>
</center>
</main>
<footer>
<?php
require_once "includes/footer.inc.php"; ?>
</footer>
</div> </div>
<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/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/toggleDarkLight.js"></script>
</body>
</html>