-
Notifications
You must be signed in to change notification settings - Fork 0
/
individual_report.php
77 lines (66 loc) · 2.4 KB
/
individual_report.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
<?php
ob_start();
include ('header.php');
?>
<div class="page-title">
<div class="title_left">
<h3>
<small>Home /</small> Individual Report
</h3>
</div>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="x_panel">
<div class="x_title">
<div class="clearfix"></div>
</div>
<div class="x_content">
<!-- content starts here -->
<div class="container-fluid">
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-3">
<form method="post" action="">
<select name="roll_number" class="select2_single form-control" required="required" tabindex="-1" >
<option value="0">Select Roll Number</option>
<?php
$result= mysqli_query($con,"select * from user") or die (mysqli_error($con));
while ($row= mysqli_fetch_array ($result) ){
$id=$row['user_id'];
?>
<option value="<?php echo $row['roll_number']; ?>"><?php echo $row['roll_number']; ?> - <?php echo $row['firstname']; ?></option>
<?php } ?>
</select>
<br />
<br />
<button name="submit" type="submit" class="btn btn-primary" style="margin-left:110px;"><i class="glyphicon glyphicon-log-in"></i> Submit</button>
</form>
<?php
include ('include/dbcon.php');
if (isset($_POST['submit'])) {
$roll_number = $_POST['roll_number'];
$sql = mysqli_query($con,"SELECT * FROM user WHERE roll_number = '$roll_number' ");
$count = mysqli_num_rows($sql);
$row = mysqli_fetch_array($sql);
if($count <= 0){
echo "<div class='alert alert-success'>".'No match found for the School ID Number'."</div>";
}else{
$roll_number = $_POST['roll_number'];
header('location: individual_report_search.php?roll_number='.$roll_number);
}
}
?>
</div>
<div class="col-md-4"></div>
</div>
</div>
<!-- content ends here -->
</div>
</div>
</div>
</div>
<?php include ('footer.php');
ob_end_flush();
?>