-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathme.page.php
47 lines (43 loc) · 1.65 KB
/
me.page.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
<?php
include "header.php";
include "process/dbConn.php";
?>
<html>
<body>
<?php
if (isset($_SESSION['id'])){
$id = $_SESSION['id'];
$sql = "SELECT * FROM $tableUser WHERE id = '$id'";
$result = $conn->query($sql);
$row = $result->fetch_assoc();
if ($row){
$Username = $row['Username'];
$Firstname = $row['Firstname'];
$Lastname = $row['Lastname'];
$Address = $row['Adress'];
$Email = $row['Email'];
$Date = $row['JoinDate'];
$ProfileViews = $row['ProfileViews'];
$Posts = $row['Posts'];
$JoinNumber = $row['id'];
$UpVotes = $row['UpVotes'];
echo "<h1>".$Username."</h1>
<p>Name: ".$Firstname." ".$Lastname."<br>
Address: ".$Address."<br>
Email: ".$Email."<br>
Account started: ".$Date."<br>
Profile views: ".$ProfileViews."<br>
Posts: ".$Posts."<br>
Join number: ".$JoinNumber."<br>
Up votes: ".$UpVotes."</p>";
}else{
echo "unexpected error, an email has been sent to the developers who will fix this immediatley!";
}
}else{
echo "<br><p>You are not logged in!</p> <br>
<p>Login here: <a href = 'login.page.php'>login</a></p><br>
<p>Signup here: <a href = 'signup.page.php'>signup</a></p>";
}
?>
</body>
</html>