-
Notifications
You must be signed in to change notification settings - Fork 8
/
show.php
88 lines (65 loc) · 2.42 KB
/
show.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
<?php
$servername="localhost";
$username="root";
$password="";
$dbname="project_db";
$conn= mysqli_connect($servername,$username,$password,$dbname);
$query="SELECT * FROM exam_marksheet";
$data= mysqli_query($conn, $query);
$data2= mysqli_query($conn, $query);
mysqli_query($conn,"SELECT * FROM master_user");
echo "<h4>Total number of records inserted are =";
echo mysqli_affected_rows($conn)."</h4>";
?>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<table class="table table-hover">
<div class="container">
<form action="" method="GET">
<input type="number" name="id" >
<br> <br><input type="submit" class="btn btn-info" value="Submit Button">
</div>
</form>
<?php
$count=0;
$id=0;
if(isset($_GET['id']))
$id=$_GET['id'];
//
$data1= mysqli_query($conn,"SELECT seat_no from exam_user where exam_id=$id" ) ;
$seat = mysqli_fetch_assoc($data1);
echo "<h4>Seat number is:";
echo $seat['seat_no']."</h4>";
$result=array();
$i=0;
while( $heading=mysqli_fetch_assoc($data))
{
if($heading['exam_user_id']==$id)
{
echo "
<th>".$heading['short_code']."</th>";
}
}
echo "<tr>";
while($re=mysqli_fetch_assoc($data2))
{
if($re['exam_user_id']==$id)
{
echo "
<td>".$re['obtained']."</td>";
}
}
?></table>
</div>