Here is the complete code. Thank you!!
create table Payroll
(PayrollNumber int(5) not null,
StaffID varchar(25),
GrossPay float,
HourlyRate float,
YearToDateEarnings float,
IncomeTax float,
EPFNumber varchar(25),
SOCSONumber varchar(25));
insert into Payroll
values (10001, 'Ken', 12000.10, 160, 36000.50, 200.30, 'A12121212', 'B23232323');
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2"><font size="2">Welcome
<?php
foreach ($HTTP_COOKIE_VARS as $value)
print ("$value"); ?>
! </font></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td width="33%">Payroll Number :</td>
<td width="67%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? $Connect = mysql_connect("localhost","root","");
mysql_select_db("mw");
$StaffID = "$value";
$result=mysql_query("select from Payroll where StaffID = '$StaffID'") ;
$number_of_array = mysql_num_rows($result);
while ($number_of_array = mysql_fetch_array($result)){
echo "$number_of_array[PayrollNumber]";
}
mysql_close();
?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="33%">Staff ID :</td>
<td width="67%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? echo $value ?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="33%">Gross Pay :</td>
<td width="67%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? $Connect = mysql_connect("localhost","root","");
mysql_select_db("mw");
$StaffID = "$value";
$result=mysql_query("select from Payroll where StaffID = '$StaffID'") ;
$number_of_array = mysql_num_rows($result);
while ($number_of_array = mysql_fetch_array($result)){
echo "$number_of_array[GrossPay]";
}
mysql_close();
?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="33%">Hourly Rate :</td>
<td width="67%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? $Connect = mysql_connect("localhost","root","");
mysql_select_db("mw");
$StaffID = "$value";
$result=mysql_query("select from Payroll where StaffID = '$StaffID'") ;
$number_of_array = mysql_num_rows($result);
while ($number_of_array = mysql_fetch_array($result)){
echo "$number_of_array[HourlyRate]";
}
mysql_close();
?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="33%">Year To Date Earnings :</td>
<td width="67%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? $Connect = mysql_connect("localhost","root","");
mysql_select_db("mw");
$StaffID = "$value";
$result=mysql_query("select from Payroll where StaffID = '$StaffID'") ;
$number_of_array = mysql_num_rows($result);
while ($number_of_array = mysql_fetch_array($result)){
echo "$number_of_array[YearToDateEarnings]";
}
mysql_close();
?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="33%">Income Tax :</td>
<td width="67%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? $Connect = mysql_connect("localhost","root","");
mysql_select_db("mw");
$StaffID = "$value";
$result=mysql_query("select from Payroll where StaffID = '$StaffID'") ;
$number_of_array = mysql_num_rows($result);
while ($number_of_array = mysql_fetch_array($result)){
echo "$number_of_array[IncomeTax]";
}
mysql_close();
?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="33%">EPF Number :</td>
<td width="67%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? $Connect = mysql_connect("localhost","root","");
mysql_select_db("mw");
$StaffID = "$value";
$result=mysql_query("select from Payroll where StaffID = '$StaffID'") ;
$number_of_array = mysql_num_rows($result);
while ($number_of_array = mysql_fetch_array($result)){
echo "$number_of_array[EPFNumber]";
}
mysql_close();
?>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="33%">SOCSO Number : </td>
<td width="67%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<? $Connect = mysql_connect("localhost","root","");
mysql_select_db("mw");
$StaffID = "$value";
$result=mysql_query("select * from Payroll where StaffID = '$StaffID'") ;
$number_of_array = mysql_num_rows($result);
while ($number_of_array = mysql_fetch_array($result)){
echo "$number_of_array[SOCSONumber]";
}
mysql_close();
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>