-
Notifications
You must be signed in to change notification settings - Fork 0
/
deptmgmt2.php
39 lines (39 loc) · 1.01 KB
/
deptmgmt2.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
<?php
require 'ahead.php';
require 'connection.php';
$sql = "select * from dept";
if($result1 = mysqli_query($con, $sql)){
if(mysqli_num_rows($result1) > 0){
?>
<div class="container"><br>
<div class="h2 text-center">Department Details</div>
<table class="table table-bordered"><tr>
<th>name</th>
<th>email</th>
<!-- <th>pass</th> -->
<th>dept</th>
</tr>
<?php
while($row = mysqli_fetch_array($result1)){
?>
<tr><td><?php echo strtoupper($row['name']) ?>
</td><td><?php echo strtoupper($row['email']) ?>
</td><!-- <td><?php echo $row['pass'] ?>
</td>--> <td><?php echo $row['dept'] ?>
</td></tr>
<?php
}
?>
</table>
<?php
}
else
{
echo "No records matching your query were found.";
}
}
else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($con);
}
?>
</div>