-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
93 lines (78 loc) · 3.55 KB
/
index.php
File metadata and controls
93 lines (78 loc) · 3.55 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
<?php
//include header part of html
include('header.php')
?>
<div class="container-fluid">
<div class="row">
<div class="col-md-12 jumbotron">
<h2 style="text-align: center;">
WELCOME TO STUDENT MANAGEMENT SYSTEM
<span style="float: right;"><a href="login.php" class="btn btn-info btn-lg">University Admin Login</a></span>
</h2>
</div>
</div>
</div>
<div class="student-info text-center">
<div class="container-fluid">
<div class="row">
<div class="col-md-12 jumbotron">
<h2>Student's information</h2>
<form action="index.php" method="post">
<input type="text" name="roll" placeholder="Enter Roll Number" style="width: 240px;height: 35px;"><span>OR/AND<span>
<select name="standard" class="btn btn-info" >
<option>SELECT STANDARD</option>
<option>1st</option>
<option>2nd</option>
<option>3rd</option>
<option>4th</option>
<option>5th</option>
</select>
<input type="submit" name="show" value="SHOW INFO" class="btn btn-success text-center" style="margin-left: 30px;" >
</form>
</div>
</div>
</div>
</div>
<table class="table table-striped table-bordered table-responsive text-center">
<tr >
<th class="text-center">Roll No.</th>
<th class="text-center">Standard</th>
<th class="text-center">Full Name</th>
<th class="text-center">City</th>
<th class="text-center">parent phone No.</th>
<th class="text-center">Profile Pic</th>
</tr>
<?php
include('dbcon.php');
if (isset($_POST['show'])) {
$Standard = $_POST['standard'];
$RollNo = $_POST['roll'];
$sql = "SELECT * FROM `student` WHERE `standard` = '$Standard' OR `rollno`='$RollNo'";
$result = mysqli_query($conn,$sql);
if (mysqli_num_rows($result)>0) {
while ($DataRows = mysqli_fetch_assoc($result)) {
$Id = $DataRows['id'];
$RollNo = $DataRows['rollno'];
$Name = $DataRows['name'];
$City = $DataRows['city'];
$Pcontact = $DataRows['pcontact'];
$Standard = $DataRows['standard'];
$ProfilePic = $DataRows['image'];
?>
<tr>
<td><?php echo $RollNo;?></td>
<td><?php echo $Standard;?></td>
<td><?php echo $Name; ?></td>
<td><?php echo $City; ?></td>
<td><?php echo $Pcontact; ?></td>
<td><img src="databaseimg/<?php echo $ProfilePic;?>" alt="img"></td>
</tr>
<?php
}
} else {
echo "<tr><td colspan ='7' class='text-center'>No Record Found</td></tr>";
}
}
?>
<!--include header part of html-->
<?php include('footer.php') ?>