-
Notifications
You must be signed in to change notification settings - Fork 3
/
results.php
208 lines (179 loc) · 7.84 KB
/
results.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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?php
if($conn = mysqli_connect("localhost", "root","")) {
mysqli_select_db($conn,"gptw");
?>
<!DOCTYPE HTML>
<html>
<head>
<title>VIEW RESULTS</title>
<style type="text/css">
.a{background-color: #33ffff;height:125px;width:1335px;border-radius:15px;}
.b{color:red; }
.c{background-color: green;height:50px;width:1335px;border-radius:10px}
a{color: yellow}
.button{background-color:orange;}
th{
color:black;
font-style:oblique;
background-color: orange;
height: 20px;
padding: 10px;
width: 200px;
border: thin groove;
border-style:dashed;
}
tr{
background-color:#33ffff;
padding: 30px;
border: thin groove;
}
</style>
</head>
<body bgcolor="silver">
<!--header-->
<div class="a" align="center"><br><br>
<h2 class="b"><font color="blue" face="lucida handwriting">GOVT. POLYTECHNIC</font><font color="black"> ,</font><font face="Segoe Script"> WARANGAL</font></h2>
</div>
<div class="c" align="center"><br>
<a href="index.php">HOME </a> |
<a href="about.php">ABOUT </a> |
<a href="gallery.php">GALLERY</a> |
<a href="stdcorner.php">STUDENT CORNER</a> |
<a href="login.php">LOGIN</a> |
<a href="feedback.php">FEEDBACK</a> |
<a href="contact.php">CONTACT US</a>
</div>
<!--/header-->
<div align="center"><br>
<h2>VIEW YOUR RESULTS</h2><br>
<form action="results.php" method="POST">
PIN : <input type="text" name="pin" placeholder="Enter your PIN" value="<?php if(empty($pin)) echo ""; else{ echo $pin;} ?>" required><br>
<br><br>SEMETSER: <input type="radio" name="semester" value="1">1 semester<br>
<input type="radio" name="semester" value="2">2 semester<br>
<input type="radio" name="semester" value="3">3 semester <br>
<input type="radio" name="semester" value="4">4 semester <br>
<input type="radio" name="semester" value="5">5 semester <br>
<input type="radio" name="semester" value="6">6 semester<br>
<br><br>
<input type="submit" name="submit" value="submit" /><br><br><br><br>
<div>
<?php
if (isset($_POST['submit'])) {
$sql = "SELECT * FROM $_POST[semester]sem WHERE pin = '$_POST[pin]'";
$result = mysqli_query($conn , $sql);
if ($_POST['semester'] == 6) {
while ($result3 = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
$pin1 = $result3['PIN'];
$name1 = $result3['NAME'];
$s1 = $result3['s1'];
$total2 = $result3['TOTAL'];
}
?>
<div>
<b>SEMSTER :<?php echo "$_POST[semester]"; ?> RESULTS</b><br>
<table width="600px">
<tr><th align="center">PIN : <?php echo $pin1; ?></th><th align="center">NAME : <?php echo $name1; ?></th></tr>
<br></table><br>
<table>
<tr>
<th align="center">SUBJECT</th><th align="center">MARKS</th>
</tr>
<tr>
<td align="center"><b>s1</b></td>
<td align="center"><?php echo "$s1"; ?></td>
</tr>
<tr>
<td align="center"><b>TOTAL</b></td>
<td align="center"><?php echo "$total2"; ?></td>
</tr>
</table>
</div>
<?php
}
while ($result2 = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
$pin1 = $result2['PIN'];
$name1 = $result2['NAME'];
$s1 = $result2['s1'];
$s2 = $result2['s2'];
$s3 = $result2['s3'];
$s4 = $result2['s4'];
$s5 = $result2['s5'];
$s6 = $result2['s6'];
$s7 = $result2['s7'];
$s8 = $result2['s8'];
$s9 = $result2['s9'];
$s10 = $result2['s10'];
$total = $result2['TOTAL'];
?>
<div>
<b style="color:red;border:thick">SEMSTER :<?php echo "$_POST[semester]"; ?> RESULTS</b><br>
<table width="600px">
<tr><th>PIN : <?php echo $pin1; ?></th><th>NAME : <?php echo $name1; ?></th></tr>
<br></table><br>
<table width="600px">
<tr>
<th align="center">SUBJECT</th><th align="center">MARKS</th>
</tr>
<tr>
<td align="center"><b>s1</b></td>
<td align="center"><?php echo "$s1"; ?></td>
</tr>
<tr>
<td align="center"><b>s2</b></td>
<td align="center"><?php echo "$s2"; ?></td>
</tr>
<tr>
<td align="center"><b>s3</b></td>
<td align="center"><?php echo "$s3"; ?></td>
</tr>
<tr>
<td align="center"><b>s4</b></td>
<td align="center"><?php echo "$s4"; ?></td>
</tr>
<tr>
<td align="center"><b>s5</b></td>
<td align="center"><?php echo "$s5"; ?></td>
</tr>
<tr>
<td align="center"><b>s6</b></td>
<td align="center"><?php echo "$s6"; ?></td>
</tr>
<tr>
<td align="center"><b>s7</b></td>
<td align="center"><?php echo "$s7"; ?></td>
</tr>
<tr>
<td align="center"><b>s8</b></td>
<td align="center"><?php echo "$s8"; ?></td>
</tr>
<tr>
<td align="center"><b>s9</b></td>
<td align="center"><?php echo "$s9"; ?></td>
</tr>
<tr>
<td align="center"><b>s10</b></td>
<td align="center"><?php echo "$s10"; ?></td>
</tr>
<tr>
<td></td><td></td>
</tr>
<tr>
<td align="center"><b>TOTAL</b></td>
<td align="center"><?php echo "$total"; ?></td>
</tr>
</table>
</div>
<?php
}
}
}
?>
</div>
</form>
<!--footer-->
<br><br><br><br><br><div style="background-color:maroon;height:40px">
<p style="color:white" align="center">© 2018 GPTW . Designed by <b>Sathish kesoju</b> and <b>Rajesh Keshoju</b></p>
</div>
<!-- /footer-->
</body>
</html>