-
Notifications
You must be signed in to change notification settings - Fork 8
/
viewresult.php
126 lines (111 loc) · 2.93 KB
/
viewresult.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
<?php
/**
* @System HP-pc Rax
* @author Rakshit shah <Rakshitshah1994@gmail.com>
* @copyright 2015-2017 |Rakshit shah
* @license http://rakshit.in/license/license.php | PHP License 3.0
* @version 1.1
* @since File available since Release 1.0.0
*/
session_start();
include("header.php");
include("conection.php"); ?>
<section id="page">
<header id="pageheader" class="homeheader">
<h2 class="sitedescription"> </h2>
</header>
<section id="contents">
<article class="post">
<header class="postheader">
<h2><a href="result.php">Student Registration No.</a></h2>
</header>
<form name="form1" method="post" action="result.php">
<p>
<label for="textfield2">Roll No</label>
<input type="text" name="rollno" id="textfield2">
</p>
<p>
<input type="submit" name="button2" id="button2" value="Submit">
</p>
</form>
</article>
<article class="post">
<header class="postheader">
<h2>Search by Name and Class</h2>
</header>
<form name="form2" method="post" action="">
<p>
<label for="textfield3">Name</label>
<input type="text" name="textfield2" id="textfield3">
</p>
<p>
<label for="select">Course</label>
<?php
$rescourse = mysql_query("SELECT * FROM course ");
?>
<select name="select" id="select">
<?php
while($row1 = mysql_fetch_array($rescourse))
{
echo "<option value='$row1[courseid]'>$row1[coursekey]</option>";
}
?>
</select>
</p>
<p>
<input type="submit" name="submitresult" id="submitresult" value="Submit">
</p>
</form>
<?php
if(isset($_POST["submitresult"]))
{
$searchstu = mysql_query("SELECT * FROM studentdetails where (studfname LIKE '$_POST[textfield2]' OR `studlname` LIKE '$_POST[textfield2]') AND courseid ='$_POST[select]' ");
?>
<form name="form2" method="post" action="viewresult.php">
<table width="501" border="1">
<tr>
<td width="136"><strong>Student ID</strong></td>
<td width="88"><strong>Name</strong></td>
<td width="80"><strong>Fathers Name</strong></td>
<td width="73"><strong>Semester</strong></td>
<td width="90"><strong>View Result</strong></td>
</tr>
<?php
while($rowc = mysql_fetch_array($searchstu))
{
?><tr>
<td> <?php echo $rowc["studid"];?></td>
<td> <?php echo $rowc["studfname"]. " ". $rowc["studlname"];?></td>
<td> <?php echo $rowc["fathername"];?></td>
<td> <?php echo $rowc["semester"];?></td>
<td><a href="result.php?resid=<?php echo $rowc["studid"];?>"><img src="images/view.png" width="26" height="21"></a></td>
</tr>
<?php
}
?>
</table>
<?php
}
?>
</form>
<p> </p>
</form>
</article>
</section>
<section id="sidebar">
</section>
<section id="sidebar">
<h2> </h2>
<ul>
<li></li>
</ul>
<h2> </h2>
<ul>
<li></li>
</ul>
</section>
<div class="clear"></div>
<div class="clear"></div>
</section>
</div>
<?php include("footer.php"); ?>