-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprofile_student2.php
174 lines (165 loc) · 5.23 KB
/
profile_student2.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<?php
session_start();
if(!isset($_SESSION['user']))
{
header("Location: vit.php");
}
if($_SESSION['user']=='admin')
{
header("Location: index_admin.php");
}
if($_SESSION['user']=='student_int' )
{
header("Location: index_student_intern.php");
}
if($_SESSION['user']=='company')
{
header("Location: index_company.php");
}
?>
<?php
//session_start();
$db = mysqli_connect('localhost', 'root', '', 'placement');
//Student Profile view
$student_id="";
$student_name="";
//$father_name="";
//$mother_name="";
$dob="";
$gender="";
$st_email="";
$address1="";
$contact_num="";
$branch="";
$tenth_per="";
$tenth_pass="";
$twelfth_per="";
$twelfth_pass="";
$cgpa="";
$pass="";
$backlogs="";
$apply="";
$st_password="";
$status="";
$errors = array();
$vari=$_SESSION['student_id'];
// first check the database to make sure
// a user does not already exist with the same username and/or email
$user_check_query = "SELECT * FROM student WHERE STUDENT_ID='$vari' LIMIT 1";
$result = mysqli_query($db, $user_check_query);
//The mysqli_fetch_assoc() function fetches a result row as an associative array.
$user = mysqli_fetch_assoc($result);
$student_id=$user['STUDENT_ID'];
$student_name=$user['STUDENT_NAME'];
//$father_name=$user['FATHER_NAME'] ;
//$mother_name=$user['MOTHER_NAME'] ;
$dob=$user['DOB'] ;
$gender=$user['GENDER'] ;
$st_email=$user['EMAIL'] ;
$address1=$user['ADDRESS'] ;
$contact_num=$user['CONTACT_NO'] ;
$branch=$user['BRANCH'] ;
$tenth_per=$user['TENTH_PER'] ;
$tenth_pass=$user['TENTH_PASS_YEAR'] ;
$twelfth_per=$user['TWELTH_PER'] ;
$twelfth_pass=$user['TWELTH_PASS_YEAR'] ;
$cgpa=$user['CGPA'] ;
$pass=$user['PASSING_YEAR'] ;
$backlogs=$user['BACKLOGS'] ;
$apply=$user['APPLY_FOR'] ;
$status=$user['STATUS'];
if($status=='NS')
{
$status='-';
}
else
{
$user_check_query = "SELECT * FROM student_placement WHERE STUDENT_ID='$vari' LIMIT 1";
$result = mysqli_query($db, $user_check_query);
//The mysqli_fetch_assoc() function fetches a result row as an associative array.
$user = mysqli_fetch_assoc($result);
$com_name=$user['COMPANY_NAME'];
$status=$com_name;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Profile of student</title>
<link rel="stylesheet" type="text/css" href="1.css">
<link rel="shortcut icon" type="image/png" href="vit.png">
<link rel="stylesheet" type="text/css" href="stl.css">
</head>
<body>
<div class="list-unstyled3" >
<ul>
<li><a href="vit.php"><img src="vit.png" alt="VIT Pune" class="logo2" height="40" align="left"/></a></li>
<li style="float:right"><a href="logout.php" title="<?php echo $_SESSION['student_name']; ?> ">Log Out</a></li>
<div class="para">
<p> Training & Placement,VIT Pune</p>
</div>
</ul>
</div>
<div class="header">
<h2>Student Profile</h2>
</div>
<center>
<div style="border-radius:60px;">
<?php
$varie=$_SESSION['student_id'];
$db1 = mysqli_connect('localhost', 'root', '', 'placement');
$user_check_query = "SELECT * FROM student WHERE STUDENT_ID='$varie' ";
$result = mysqli_query($db1, $user_check_query);
$user = mysqli_fetch_assoc($result);
echo'<img src="data:image/jpeg;base64,'.base64_encode($user['IMAGE'] ).'" height="200" width="250" class="img-thumnail" style="border-radius:15px;margin-top:20px;margin-bottom:-30px" />' ;
?>
</div>
<div class="container" style="width:25%;border:solid;border-radius:5px;position:relative;top:50px">
<br>
<p style="padding-right:40px;"><b>Student Name :</b> <?php echo $student_name; ?></p>
<br>
<p style="padding-right:40px;"><b>Student Id :</b> <?php echo $student_id; ?></p>
<br>
<p style="padding-right:40px;"><b>Status :</b> <?php echo $status; ?></p>
<br>
<!--
<p style="padding-right:40px;"><b>Father Name :</b> <?php //echo $father_name; ?></p>
<br>
<p style="padding-right:40px;"><b>Mother Name :</b> <?php //echo $mother_name; ?></p>
<br>
-->
<p style="padding-right:40px;"><b>D.O.B :</b> <?php echo $dob; ?></p>
<br>
<p style="padding-right:40px;"><b>Gender :</b> <?php echo $gender; ?></p>
<br>
<p style="padding-right:40px;"><b>Email :</b> <?php echo $st_email; ?></p>
<br>
<p style="padding-right:40px;"><b>Address:</b> <?php echo $address1; ?></p>
<br>
<p style="padding-right:40px;"><b>Conatct Number :</b> <?php echo $contact_num; ?></p>
<br>
<p style="padding-right:40px;"><b>Branch:</b> <?php echo $branch; ?></p>
<br>
<p style="padding-right:40px;"><b>10th % :</b> <?php echo $tenth_per; ?></p>
<br>
<p style="padding-right:40px;"><b>10th pass year :</b> <?php echo $tenth_pass; ?></p>
<br>
<p style="padding-right:40px;"><b>12% :</b> <?php echo $twelfth_per; ?></p>
<br>
<p style="padding-right:40px;"><b>12th pass year :</b> <?php echo $twelfth_pass; ?></p>
<br>
<p style="padding-right:40px;"><b>CGPA :</b> <?php echo $cgpa; ?></p>
<br>
<p style="padding-right:40px;"><b>Final Year :</b> <?php echo $pass; ?></p>
<br>
<p style="padding-right:40px;"><b>Backlogs :</b> <?php echo $backlogs; ?></p>
<br>
<p style="padding-right:40px;"><b>Apply For :</b> <?php echo $apply; ?></p>
<br>
</div>
</center>
</body>
</html>
<?php
//header("Location: logout.php");
?>