I've read through few forums solution and had made some changes. However, it still didn't divert to the required page. Can anybody help me out?
B]Below are my code:[/B]
<html>
<! --- Generated by Selida 04-30-2004 --- !>
<head>
<title>Employee Overtime System Login</title>
</head>
<body bgcolor="#663366" link="#0000FF" text="#FFCCFF" alink="#FF0000" vlink="#FF00FF">
<p>   </p>
<p>   </p>
<p>   </p>
<p align="center"><font size="7" style="Arial Black"> Supervisor EOT Login</font></p>
<form name="frmLogin" method="post" >
<table border="4" bgcolor="#FFCCFF" align="center" cellpadding="0" width="51%" bordercolor="#663399">
<tr>
<td>
<table width="100%" height="225" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#66FFFF">
<tr><td bgcolor="663399">
<p> </p>
<table width="84%" height="70" bgcolor="#663399" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="34%" height="37%"><div align="left">
<font size="4"> Employee ID :</font></div>
</td>
<td width= "60%"><input type="text" tabindex="0" name="EmpID">
</td>
</tr>
<tr>
<td height="100%"> <font size="4"> Password :</font></td>
<td width="60%"> <input type="password" tabindex="" name="Password"><td>
</tr>
</table>
<p align="center">
<input align="center" name="login" tabindex="" type="submit" id="btnLogin" value="Login" style="font-family:verdana,arial,helvetica; font-size:10pt; height:25; width:140; background:#99CCFF; border:2 solid #663366; cursor:hand">
<?php if(isset($_POST['btnLogin']))
{
error_reporting(E_ALL);
$db_host="localhost";
$mysql_database="dbtest01";
$link = mysql_connect("localhost") or die("Unable connect to MySQL Server");
mysql_select_db($mysql_database, $link) or die("Unable to select database");
if(isset($_POST['Password']))
{$EmpID= $_POST['EmpID'];
$password = $_POST['Password'];
$query ="SELECT * FROM SUPERVISOR WHERE Supervisor_ID='$EmpID' AND Password='$password';";
$result = mysql_query($query);
if(mysql_num_rows($result))
{
//echo "<font color=#FFFFFF><Center><b>**Successful Login**</b></Center></font>" ;
header('Location: [url]http://localhost/main.php[/url]');
//echo '<script language="Javascript">';
//echo 'window.location="http://localhost/main.php"';
// echo '</script>';
exit;
}
else
{echo "<font color=#ffffff><Center><b>**Failed Login**</b></Center></font>";}
mysql_close();
}
else
{echo "<font color=#ffffff><Center><b>**No login attempted**</b></Center></font>";}
}
?>
</p>
</td></tr>
</table>
</td></tr>
</table>
</form>
</body>
</html>