-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemployee disp.php
60 lines (58 loc) · 1.44 KB
/
employee disp.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
<?php
$mysql_id=mysqli_connect("localhost","root","","bloodbank_db");
$query="SELECT * FROM `EMPLOYEE_INFO` ;";
$res=mysqli_query($mysql_id,$query);
if($res->num_rows>0)
{
?>
<html>
<title><head>Fetch from database</head></title>
<body>
<link rel="stylesheet" href="common.css">
<div class="nav">
<div class="topnav">
<a class="active" href="welcome.html">Home</a>
<a href="contact.html">Contact</a>
</div>
</div>
<table align ="center" border="1px" style ="width:600px; line-height:30px;">
<tr>
<th colspan = "9"><h2>INVENTORY</h2></th>
</tr>
<tr>
<th>ID</th>
<th>NAME</th>
<th>Date of birth</th>
<th>Email</th>
<th>Mobile number</th>
<th>SEX</th>
<th>Designation</th>
<th>Passwords</th>
<th>Address</th>
</tr>
<?php
while($rows=mysqli_fetch_assoc($res))
{
?>
<tr>
<td><?php echo $rows['ID'];?></td>
<td><?php echo $rows['NAME'];?></td>
<td><?php echo $rows['DOB']; ?></td>
<td><?php echo $rows['EMAIL']; ?></td>
<td><?php echo $rows['PHONE']; ?></td>
<td><?php echo $rows['SEX'];?></td>
<td><?php echo $rows['DESGNATION']; ?></td>
<td><?php echo $rows['PASSWORDS']; ?></td>
<td><?php echo $rows['ADDRESS']; ?></td>
</tr>
<?php
}
?>
</table>
</body>
</html>
<?php
}
else
echo "Empty set";
?>