<html>
<head>
<title>
Edit Leave
</title>
</head>
</html>
<body style="background-color: #ffffff;background-image:url(rail.jpg);background-repeat: repeat-y">
<center>
<?php include('link.php');?>
<h1 align=center>Leave Setting</h1>
<?php
$id=$_GET['id'];
echo "<h3><a href='http://www.wauhaha.com/karaoke/lset.php?id=$id";   ?>
<?php $login=mysql_connect('localhost', 'wauhaha_karaoke', 'cross123','wauhaha_karaoke');
	
mysql_selectDB("wauhaha_karaoke",$login);
$date = date('Y-m-d');
	$result =mysql_query('select * from admin');
	$r = mysql_fetch_array($result);
	$id2 = $r['Username'];  echo "id=$id2";?>'><img src=back.jpg width=40 height=40></a></h3>

<?php 
$id = $_GET['id'];
$result2 =mysql_query("select * from leave2 where id='$id'");
$ro = mysql_fetch_array($result2);

$l = $ro['l'];
$y = $ro['year'];

echo"<form method=post action='eleaveaction.php?id=$id'>
<table align=center>
<tr>
	<td>ID :</td>
	<td>$id</td>
</tr>
<tr>
	<td>Leave :</td>
	<td><input type=text name=l value=$l></td>
</tr>
<tr>
	<td>Year :</td>
	<td><input type=text name=y value=$y></td>
</tr>
<tr>
	<td>Edited By :</td>
	<td>$id2<input type=hidden name=id2 value=$id2 ></td>
</tr>
<tr>
	<td>Edited Date :</td>
	<td>$date <input type=hidden name=date value=$date></td>
</tr>
<tr>
	<td colspan=2 align=center><input type=submit value=Edit><input type=reset value=reset></td>
</tr>
</table>";
?>