-
Notifications
You must be signed in to change notification settings - Fork 12
/
salaryemp.php
74 lines (51 loc) · 1.71 KB
/
salaryemp.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
<?php
require_once ('process/dbh.php');
$sql = "SELECT employee.id,employee.firstName,employee.lastName,salary.base,salary.bonus,salary.total from employee,`salary` where employee.id=salary.id";
//echo "$sql";
$result = mysqli_query($conn, $sql);
?>
<html>
<head>
<title>Salary Table | XYZ Corporation</title>
<link rel="stylesheet" type="text/css" href="styleview.css">
</head>
<body>
<header>
<nav>
<h1>XYZ Corp.</h1>
<ul id="navli">
<li><a class="homeblack" href="aloginwel.php">HOME</a></li>
<li><a class="homeblack" href="addemp.php">Add Employee</a></li>
<li><a class="homeblack" href="viewemp.php">View Employee</a></li>
<li><a class="homeblack" href="assign.php">Assign Project</a></li>
<li><a class="homeblack" href="assignproject.php">Project Status</a></li>
<li><a class="homered" href="salaryemp.php">Salary Table</a></li>
<li><a class="homeblack" href="empleave.php">Employee Leave</a></li>
<li><a class="homeblack" href="alogin.html">Log Out</a></li>
</ul>
</nav>
</header>
<div class="divider"></div>
<div id="divimg">
</div>
<table>
<tr>
<th align = "center">Emp. ID</th>
<th align = "center">Name</th>
<th align = "center">Base Salary</th>
<th align = "center">Bonus</th>
<th align = "center">TotalSalary</th>
</tr>
<?php
while ($employee = mysqli_fetch_assoc($result)) {
echo "<tr>";
echo "<td>".$employee['id']."</td>";
echo "<td>".$employee['firstName']." ".$employee['lastName']."</td>";
echo "<td>".$employee['base']."</td>";
echo "<td>".$employee['bonus']." %</td>";
echo "<td>".$employee['total']."</td>";
}
?>
</table>
</body>
</html>