-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile.php
129 lines (92 loc) · 3.99 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
<?php
session_start();
include_once 'dbconnect.php';
if(!isset($_SESSION['user']))
{
header("Location: index.php");
}
$res=mysql_query("SELECT * FROM users WHERE user_id=".$_SESSION['user']);
$userRow=mysql_fetch_array($res);
?>
<!DOCTYPE html>
<!-- Template by Quackit.com -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Welcome - <?php echo $userRow['user_email']; ?></title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS: You can use this stylesheet to override any Bootstrap styles and/or apply your own styles -->
<link href="css/custom.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Navigation -->
<?php include_once('include/nav.php'); ?>
<!-- End of Navigation -->
<div class="container-fluid" style="margin-top: 20px;">
<!-- Left Column -->
<?php include_once('include/LeftColumn.php'); ?>
<!--/Left Column-->
<!-- Center Column -->
<div class="col-sm-6">
<!-- Alert -->
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>Welcome:</strong> <?php echo $userRow['user_name']; ?>
</div>
<!-- Articles -->
<?php
$connect11 = mysql_connect("localhost", "root", "");
$database11 = mysql_select_db("dbtest", $connect11);
//$sql12 = mysql_query("SELECT * FROM users WHERE user_id=$id",$connect11);
$sql12=mysql_query("SELECT * FROM users WHERE user_id=".$_SESSION['user']);
if(!$sql12){
die("Unable to fetch data from databse".mysql_error());
}
while ($result = mysql_fetch_array($sql12)){
echo "<table border=\"0\" class='table table-hover'>";
echo "<tr style='background: #32CD32; color:#fff; '>";
echo "<th>UseName:</th>";
echo "<td>".$result['user_name']."</td>";
echo "</tr>";
echo "<tr><th>Course :</th>";
echo "<td>".$result['course' ]."</td>";
echo "</tr>";
echo "<tr style='background: #1E90FF; color: #fff;'>";
echo "<th>Level:</th>";
echo "<td>".$result['level']."</td>";
echo "</tr>";
echo "<tr>";
echo "<th>Email:</th>";
echo "<td>".$result['user_email']."</td>";
echo "</tr>";
}
echo "</table>";
?>
</div>
<!--/Center Column-->
<!-- Right Column -->
<?php include_once('include/RightColumn.php'); ?>
<!--/Right Column -->
</div>
<!--/container-fluid-->
<?php include_once('include/footerstd.php');?>
<!-- jQuery -->
<script src="js/jquery-1.11.3.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- IE10 viewport bug workaround -->
<script src="js/ie10-viewport-bug-workaround.js"></script>
<!-- Placeholder Images -->
<script src="js/holder.min.js"></script>
</body>
</html>