-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathprofil.php
52 lines (48 loc) · 1.2 KB
/
profil.php
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
<?php
include 'dbreq.php';
if($_SESSION['id']) {
$getid = intval($_SESSION['id']);
$requser = $bdd->prepare('SELECT * FROM user WHERE id = ?');
$requser->execute(array($getid));
$userinfo = $requser->fetch();
?>
<?php
include 'intro.php';
include 'menu.php';
?>
<div align="center">
<br>
<h2><u><?php echo $userinfo['pseudo'] . "'s" . " " . "Profile" ?></u></h2> <br> <br>
<table class="text-center">
<tr>
<td>
<u>Username:</u>
</td>
<td>
<?php echo $userinfo['pseudo']; ?>
</td>
</tr>
<tr>
<td>
<u>Email:</u>
</td>
<td>
<?php echo $userinfo['mail']; ?>
</td>
</tr>
</table>
<?php
if(isset($_SESSION['id']) AND $userinfo['id'] == $_SESSION['id']) {
?>
<br />
<a href="editionprofil.php">Edit my Profile</a> <br>
<a href="deconnexion.php">Log Out</a>
<p></p>
<a href="delherprofil.php?id=<?= $_SESSION['id'] ?>">Delete my profile</a>
<?php } ?>
<p></p>
</div>
<?php
}
include 'outro.php'
?>