-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudent.php
More file actions
142 lines (121 loc) · 3.36 KB
/
Copy pathstudent.php
File metadata and controls
142 lines (121 loc) · 3.36 KB
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
<?php
include"database.php";
session_start();
if(!isset($_SESSION["AID"]))
{
echo"<script>window.open('index.php?mes=Access Denied...','_self');</script>";
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Tutor Joe's</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<?php include"navbar.php";?><br>
<img src="img/1.jpg" style="margin-left:90px;" class="sha"> <br><br>
<div id="section">
<h3 class="text">Welcome <?php echo $_SESSION["ANAME"]; ?></h3><br><hr><br>
<div class="content">
<h3 >View Student Details</h3><br>
<form method="post" action="<?php echo $_SERVER["PHP_SELF"];?>">
<div class="lbox1">
<label>Class</label><br>
<select name="cla" required class="input3">
<?php
$sl="SELECT DISTINCT(CNAME) FROM class";
$r=$db->query($sl);
if($r->num_rows>0)
{
echo"<option value=''>Select</option>";
while($ro=$r->fetch_assoc())
{
echo "<option value='{$ro["CNAME"]}'>{$ro["CNAME"]}</option>";
}
}
?>
</select>
<br><br>
</div>
<div class="rbox">
<label>Section</label><br>
<select name="sec" required class="input3">
<?php
$sql="SELECT DISTINCT(CSEC) FROM class";
$re=$db->query($sql);
if($re->num_rows>0)
{
echo"<option value=''>Select</option>";
while($r=$re->fetch_assoc())
{
echo "<option value='{$r["CSEC"]}'>{$r["CSEC"]}</option>";
}
}
?>
</select><br><br>
</div>
<button type="submit" class="btn" name="view"> View Details</button>
</form>
<br>
<div class="Output">
<?php
if(isset($_POST["view"]))
{
echo "<h3>Student Details</h3><br>";
$sql="select * from student where SCLASS='{$_POST["cla"]}' and SSEC='{$_POST["sec"]}'";
$re=$db->query($sql);
if($re->num_rows>0)
{
echo '
<table border="1px">
<tr>
<th>S.No</th>
<th>Roll No</th>
<th>Name</th>
<th>Father Name</th>
<th>DOB</th>
<th>Gender</th>
<th>Phone</th>
<th>Mail</th>
<th>Address</th>
<th>Class</th>
<th>Sec</th>
<th>Image</th>
</tr>
';
$i=0;
while($r=$re->fetch_assoc())
{
$i++;
echo "
<tr>
<td>{$i}</td>
<td>{$r["RNO"]}</td>
<td>{$r["NAME"]}</td>
<td>{$r["FNAME"]}</td>
<td>{$r["DOB"]}</td>
<td>{$r["GEN"]}</td>
<td>{$r["PHO"]}</td>
<td>{$r["MAIL"]}</td>
<td>{$r["ADDR"]}</td>
<td>{$r["SCLASS"]}</td>
<td>{$r["SSEC"]}</td>
<td><img src='{$r["SIMG"]}' height='70' width='70'></td>
</tr>
";
}
}
else
{
echo "No record Found";
}
echo "</table>";
}
?>
</div>
</div>
</div>
<?php include"footer.php";?>
</body>
</html>