after inserting the codes that you provided, (SHOWN BELOW)..
it gives me an ERROR of :
Stack Overflow at LINE 26
Line 26 : after the line of <form> tag
Why does this occur??
<script language="JavaScript">
function onChange()
{
document.HODApplyfrm.EName.value = document.HODApplyfrm.emID.options[document.HODApplyfrm.emID.selectedIndex].value;
}
</script>
<html>
<head>
<title>Title here!</title>
</head>
<body bgcolor="#D6D6AD" link="#0000FF" text="#000000" alink="#FF0000" vlink="#FF00FF">
<table bgcolor="#800000" width="100%" border="" bordercolor="#000000">
<tr height="50"><td>
<p><font size="6" color="#FFFFFF"><b>Employee Overtime Application Form</b></font></p>
</td></tr></table>
<form method="POST" action ="HODApply.php" name=HODApplyfrm>
<?php
include('connect2db.php');
$query = "SELECT employee.Emp_ID, employee.Emp_Name from employee,supervisor WHERE employee.Supervisor_ID = supervisor.Supervisor_ID and supervisor.Supervisor_ID ='". $_SESSION['Department']."'";
$result = mysql_query($query);
echo '<font size="4"><b>Employee : </b></font>';
echo '<select name="emID" id="emID" style="width: 100px;" onchange="onchange()">';
echo '<option></option>';
while($row = mysql_fetch_array($result,MYSQL_NUM)){
echo '<option value="'.$row[1].'">'.$row[0].'</option>';
}
echo '</select>';
echo '<input type="text" style="width: 250px; value="" name="EName" id="EName" ></input>';
echo '<br>';
echo '<font size="4"><b>OT Rate : </b></font>';
echo '<select name="OT_Rate" id="OT_Rate">';
$query3 = "SELECT * FROM otcode;";
$result3= mysql_query($query3);
while($rate = mysql_fetch_array($result3,MYSQL_NUM)){
echo '<option>'.$rate[0].'</option>';
}
echo '</select>'
?>
............
.........
............
........
</table>
</form>
</body>
</html>