-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
151 lines (131 loc) · 2.72 KB
/
profile.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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?php
session_start();
?>
<!DOCTYPE html>
<html >
<head>
<title>Profile</title>
<link rel="stylesheet" href="profilestyle.css">
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
height:50px;
overflow: hidden;
background-color:black;
opacity:0.75;
z-index:5;
margin:5px;
}
li {
float: right;
letter-spacing:1.5px;
}
li a {
display: block;
color: white;
text-align: center;
text-decoration: none;
padding: 14px 16px;
}
li a:hover {
background-color: #111;
}
span.info1{
color:white;
font-size:15px;
}
div.a{
top:125px;
left:35%;
height:500px;
width:800px;
background-image:url("images/30.jpg");
background-size:auto 100%;
background-repeat:no-repeat;
opacity:0.4;
border-radius:30px;
}
div.c{
top:170px;
left:43%;
color:white;
float:left;
}
div.c p{
font-size:25px;
font-family: "Times New Roman", Times, serif;
font-weight:bold;
top:150px;
left:40%;
float:left;
}
div.b{
height:500px;
width:800px;
top:200px;
left:25%;
}
div.b p{
margin: 10%;
font-size:20px;
color:black;
}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<div class="container-info">
<br>
<ul>
<li style="float:left;font-size:22px;letter-spacing:3px;color:white;padding:10px;">                        Parsec</li>
<li><a href="logout.php">LOG OUT         </a></li>
<li><a href="new.php">WHAT'S NEW PARSEC </a>         </li>
<li><a href="quiz.php?pq=1&q=1&q1=1&ans=">QUIZ </a>         </li>
<li style="background-color:green;"><a href="#">PROFILE </a>         </li>
<li><a href="login.php">HOME </a>         </li>
</ul>
</div>
<div class="a container-info"></div>
<div class="c container-info">
<p>
STUDENT PROFILE
</p>
</div>
<div class="b container-info">
<p>
<?php
if(isset($_SESSION['username'])){
$conn=new mysqli("localhost","root","","space");
if($conn->connect_error){
header("Location:anonymous.html");
exit();
}
$sql="select * from details where username='".$_SESSION['username']."'";
$result=$conn->query($sql);
if($result){
$row=$result->fetch_assoc();
echo "<b> NAME : </b>";
echo $row['username']."<br><br><br>";
echo "<b> EMAIL-ID : </b>";
echo $row['email']."<br><br><br>";
echo "<b> PASSWORD : </b>";
echo $row['password']."<br><br>";
}
else{
header("Location:anonymous.html");
exit();
}
}
else{
header("Location:anonymous.html");
exit();
}
?>
</p>
</div>
</div>
<script src="profilejs.js"></script>
</body>
</html>