-
Notifications
You must be signed in to change notification settings - Fork 0
/
Student_Info.php
169 lines (132 loc) · 3.77 KB
/
Student_Info.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
<?php
//connect to my sql
$conn = mysqli_connect('localhost','root','123456','universitymanagment');
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Student Information</title>
<style>
h1 {
font-size: 40px;
text-shadow: 3px 2px red;
}
#container1{
overflow: hidden;
color: saddlebrown;
}
#container2{
overflow: hidden;
color: saddlebrown;
}
#borderimg{
border: 250px solid transparent;
padding-top: 5px;
background-image: url('');
background-repeat: no-repeat;
}
tr:hover {
background-color: black;
color: white;
}
</style>
</head>
<body>
<img src="student_image.jpg" width:"400px" height="10%">
<div id ="container1">
<fieldset>
<legend><h1>Personal Details</h1></legend>
<table>
<thead>
<tr align="left">
<th width="300">Name</th>
<th width="300">Father's Name</th>
<th width="300">Mother's Name</th>
<th width="300">Date of Birth</th>
<th width="300">Gender</th>
<th width="300">Address</th>
</tr>
</thead>
<?php
$c=$_SESSION['aid'];
$d=$_SESSION['psw'];
$r="select * from student_details where student_id=$c and PASSWORD=$d";
$rq="select * from mess where student_id=$c";
$r1=mysqli_query($conn,$r);
$r2=mysqli_query($conn,$r);
$rw2=mysqli_query($conn,$rq);
/* while($r2=mysqli_fetch_array($r1))
{
echo $r2['student_id'];
echo $r2['student_name'];
}*/
/*<?php while($row = mysqli_fetch_assoc($course)) : ?>
<li><?php echo $row['course_number'] ;?> <?php echo $row['number_of_credits']; ?>
<?php echo $row['course_name'];?> </li>
<?php endwhile;?>
*/
?>
<?php while($row=mysqli_fetch_assoc($r1)):?>
<tbody>
<tr>
<td><h3><?php echo $row['student_name'];?></h3></td>
<td><h3><?php echo $row['father_name'];?></h3></td>
<td><h3><?php echo $row['mother_name'];?></h3></td>
<td><h3><?php echo $row['birth_date'];?></h3></td>
<td><h3><?php echo $row['sex'];?></h3></td>
<td><h3><?php echo $row['address'];?></h3></td>
</tr>
</tbody>
<?php endwhile;?>
</table>
</fieldset>
</div>
<div id ="container2">
<fieldset>
<legend><h1>Academic Details</h1></legend>
<table>
<thead>
<tr align="left">
<th width="300">Application ID</th>
<th width="300">Hostel ID</th>
<th width="300">Department Number</th>
</tr>
</thead>
<?php while($ro=mysqli_fetch_assoc($r2)):?>
<tbody>
<tr>
<td><h3><?php echo $ro['student_id'];?></h3></td>
<td><h3><?php echo $ro['hostel_id'];?></h3></td>
<td><h3><?php echo $ro['department_number'];?></h3></td>
<?php endwhile;?>
</tr>
</tbody>
</table>
</fieldset>
<fieldset>
<legend><h1>Mess Details</h1></legend>
<table>
<thead>
<tr align="left">
<th width="300">Hostel ID</th>
<th width="300">Student ID</th>
<th width="300">Mess ID</th>
<th width="300">Mess Name</th>
</tr>
</thead>
<?php while($roqw=mysqli_fetch_assoc($rw2)):?>
<tbody>
<tr>
<td><h3><?php echo $roqw['hostel_id'];?></h3></td>
<td><h3><?php echo $roqw['student_id'];?></h3></td>
<td><h3><?php echo $roqw['mess_id'];?></h3></td>
<td><h3><?php echo $roqw['mess_name'];?></h3></td>
<?php endwhile;?>
</tr>
</tbody>
</table>
</fieldset>
</div>
</body>
</html>