forked from QueryMine/sms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
168 lines (142 loc) · 5.88 KB
/
index.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
<?php
require_once('include/login_header.php');
?>
<?php
require_once('include/dbcon.php');
?>
<!-- Session Checking -->
<?php
if(isset($_SESSION['name']))
{
}
else{
}
?>
<?php
?>
<nav class="brown darken-4">
<div class="container">
<a class="brand-logo hide-on-med-and-down" href="">Social Learnia</a>
<ul class="right">
<li class="waves-effect waves-light"><a href="">About Us</a></li>
<li class="waves-effect waves-light"><a href="login.php">Teacher Login</a></li>
<li class="waves-effect waves-light"><a href="students">Student Login</a></li>
</ul>
</div>
</nav>
<body style="background-image:url(images/sms_bg.jpg); background-size: cover; background-repeat: no-repeat; ">
<div class="row">
<div class="col l4 offset-l4 m12 s12">
<div class="card-panel with-header" style="border-radius: 15px; opacity: 0.9; margin-top: 25%;">
<div class="card-header center">
<h5>Student information</h5>
</div>
<form action="" method="POST">
<div class="input-field">
<!-- <select name="standerd" class="browser-default" > -->
<select name="standerd" >
<option value="" class="disabled">Select Standerd</option>
<option value="1">1st</option>
<option value="2">2nd</option>
<option value="3">3rd</option>
<option value="4">4th</option>
<option value="5">5th</option>
<option value="6">6th</option>
<option value="7">7th</option>
<option value="8">8th</option>
<option value="9">9th</option>
<option value="10">10th</option>
<option value="11">11th</option>
<option value="12">12th</option>
<option value="bca">BCA</option>
</select>
</div>
<div class="input-field">
<input type="text" name="rollno" id="rollno">
<label for="rollno">Enter Your Roll Number</label>
</div>
<div class="center">
<button class="btn waves-effect waves-light" name="submit" style="width: 100%; border-radius: 15px;">Show Information</button>
</div>
</form>
</div>
</div>
</div>
<?php
if(isset($_POST['submit'])){
$standerd = $_POST['standerd'];
$rollno = $_POST['rollno'];
$query = "select * from students where `standerd` = '$standerd' and `rollno` = '$rollno'";
$run = mysqli_query($con,$query);
$row = mysqli_num_rows($run);
if($row < 1)
{
echo "<script> alert('Please Enter Correct Information')</script>";
}
else{
$data= mysqli_fetch_assoc($run);
$image = $data['image'];
$name = $data['name'];
$rollno = $data['rollno'];
$standerd = $data['standerd'];
$gender = $data['gender'];
$city = $data['city'];
$contact = $data['contact'];
?>
<!-- Table Coding-->
<div class="row">
<div class="col l6 offset-l3 m12 s12">
<div class="card-panel" style="border-radius: 20px; opacity: 0.91">
<div class="row">
<div class="col l4 m12 s12 center">
<img src="img/<?php echo $image; ?>" alt="" class=" responsive-img circle" >
<h5 style="font-family:Impact, Charcoal, sans-serif; ">
<?php echo $name; ?>
</h5>
</div>
<div class="col l8 m12 s12" >
<ul class="collection" style="border-radius: 25px;" >
<li class="collection-item" >
<table class="striped" >
<tr >
<th>Roll No</th>
<td><?php echo $rollno; ?></td>
</tr>
<tr>
<th>Name</th>
<td><?php echo $name; ?></td>
</tr>
<tr>
<th>Standerd</th>
<td><?php echo $standerd; ?></td>
</tr>
<tr>
<th>Contact</th>
<td><?php echo $contact; ?></td>
</tr> <tr>
<th>City</th>
<td><?php echo $city; ?></td>
</tr>
</table>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<?php
}
}
?>
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="js/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
<!-- Compiled and minified JavaScript -->
<script>
$(document).ready(function(){
$('select').formSelect();
});
</script>
</body>
</html>