<html>
<head>
<title>
Admin Edit Salary
</title>
</head>
<body style="background-color: #ffffff;background-image:url(rail.jpg);background-repeat: repeat-y">
<center>
<?php include('link.php');?><h2>Admin Edit Salary</h2>
</center>
	
<?php
$login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
	mysql_selectDB("wauhaha_karaoke",$login);
	
	
$StaffID = $_GET['StaffID'];
$result2 = mysql_query("SELECT * FROM staff Where StaffID='$StaffID'");
$result1 = mysql_query("SELECT * FROM salary Where StaffID='$StaffID'");
  echo"<center><a href=http://www.wauhaha.com/karaoke/salary.php><img src=back.jpg width=40 height=40></a></center>";
echo "<form action=http://www.wauhaha.com/karaoke/editsalaryaction.php?StaffID=$StaffID method=post>";	
echo "<table border=1 align=center style ='font-family:Arial, Helvetica, sans-serif;font-size:1em' color='blue' bordercolorlight='tan' cellspacing=0 cellpadding=4>
 <tr bgcolor=lightblue ><th>Staff ID</th>
						<th>Username</th>
						<th>Name</th>
						<th>Salary</th>
						
						</tr>";

if($row2 = mysql_fetch_array($result2)){
  echo"<tr>";

  echo"<td>".$row2['StaffID']."</td>";
  echo"<td>".$row2['Username']."</td>";
  echo"<td>".$row2['Name']."</td>";
  }
  if($row1 = mysql_fetch_array($result1)){
  echo"<td><input type='text' name='salary' id='salary' value='".$row1['Salary']."' </td>";

  echo"</tr>";
  }
  echo"<tr>";
  echo"<Td></td>";
  echo"<td colspan=5><input type=submit value=submit /><input type=reset value = reset /></td>";

  echo"</tr>";

  echo"</form>";
  echo"</table>";

  
	?>