Repository navigation
Expand file tree
/
Copy pathStarzIke.php
More file actions
130 lines (108 loc) · 2.53 KB
/
Copy pathStarzIke.php
File metadata and controls
130 lines (108 loc) · 2.53 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<DOCTYPE! html>
<!DOCTYPE html>
<html>
<head>
<title>My Profile</title>
<style>
body{
font: 15px/1.5 Arial, Helvetica, sans-serif;
margin:0;
padding:0;
background-color:#f4f4f4;
}
/* Global */
.container{
width:60%;
margin: auto;
overflow: hidden;
}
header{
background: #35424a;
color: #ffffff;
padding-top: 30px;
min-height: 40px;
border-bottom: #e8491d 3px solid;
}
header #branding{
float: left;
}
header #branding h1{
margin:0;
font-size: 20px;
margin-bottom: 3px;
margin-left: 250px;
}
header .highlight, header .current a{
color: #e8491d;
font-weight: bold;
}
section .container .login{
height: 200%;
}
form .form{
margin-top: 50px;
padding: 20px;
background-color: #35424a;
border-radius: 10px;
color: white;
font-weight: bold;
width: 50%;
}
img{
margin-left: 20px;
}
form .form p{
margin-left: -140px;
}
form .form h4{
margin-left: -110px;
}
</style>
</head>
<body>
<?php
//Fetch User Details
require '../db.php';
try {
$query = "SELECT * FROM interns_data_ WHERE username='StarzIke'";
$resultSet = $conn->query($query);
$result = $resultSet->fetch(PDO::FETCH_ASSOC);
} catch (PDOException $e){
throw $e;
}
$username = $result['username'];
$name = $result['name'];
$picture = $result['image_filename'];
//Fetch Secret Word
try{
$querySecret = "SELECT * FROM secret_word LIMIT 1";
$resultSet = $conn->query($querySecret);
$result = $resultSet->fetch(PDO::FETCH_ASSOC);
$secret_word = $result['secret_word'];
}catch (PDOException $e){
throw $e;
}
$secret_word = $result['secret_word'];
?>
<header>
<div class="container">
<div id="branding">
<h1><span class="highlight">My</span>Profile</h1>
</div>
</div>
</header>
<section>
<div class="container">
<center>
<div class="form">
<div class="user">
<img src="http://res.cloudinary.com/starzike/image/upload/v1524580965/Esther.jpg">
</div>
<p class="p1">Name: <?php echo $name; ?> </p>
<h4 class="p2">Username: <?php echo $username; ?> </h4>
</div>
</center>
</div>
</section>
</body>
</html>