<? session_start();?>
<script>
window.resizeTo(720,250);
</script>
<?

 if($user !='Administrator')
  {
    print "<center><br><br><font face='sans-serif' color=red>Sorry, You are not authorized to change Data</font>";
    return;
  }
?>
<style>
 td{font-family:sans-serif;color:black;}
 .x{background-color:22437f;color:white;}
 th{font-family:sans-serif;color:white;}
 body{background-color:lightsteelblue;}
 input
  {border-style:ridge;
   border-color:#22437f;
   height:30px;
   border-size=1;
   font-family:sans-serif;
   color:#22437f;
  }

</style>
<?
// print $n;
$link=mysqli_connect("localhost.localdomain","root");
mysqli_select_db("vcmvtrade") or die ("<h3> Error:Database could not be connected-".mysqli_error());
$sql="select * from desmas where des='$n'";
$result=mysqli_query($db,$sql) or die(mysqli_error());
?><br>
<center>
<form action="http://www.vtrade.com/upddes.php" method="post">
<input type=hidden name=des value='<?print $n?>'>
<table border=1>
<tr><td><center>Edit Record</tr></td>
<tr><td>
<table bgcolor=#22437f cellspacing=1 cellpadding=1 width=100%>
<th>No.<th width=350>Designation <th>Level<th>No. of <br>Posts<th>Post<br> Filled<th>Scale of Pay<?
 $i=1;
while($row=mysqli_fetch_row($result))
{
 print "<tr bgcolor='lightsteelblue'><td>".$i++."</td><td>$row[0]</td><td>$row[1]</td><td align=center><input type=text size=2 name= np value='$row[2]'></td>";
print "<td><input type=text size=2 name= pf value=$row[3]></td>";
print "<td colspan=2><input type=text size=25 name= sp value=$row[4]></td></tr>";
}
?>
</table>
</td></tr>
<tr><td align=center><input type=submit value=" Update ">
<input type=button value= " Cancel " onClick=window.close()></tr></td>
</table>
</form>
