Sorry forgot to add the code
<html>
<body>
<table border="2" bgcolor="#3399FF" cellpadding="1" cellspacing="1">
<form name='form1' method='post' action='formloop.php'>
<input type='submit' name='save' value='Submit'>
<?php
$a=0;
while ($a <= "2"){
echo"<tr><td><input type='text' name='enum'></td>
<td><input type='text' name='ename' size='2'></td>
<td><input type='text' name='time'></td>
<td><input type='text' name='timehalf'></td>
<td colspan='0' align = center> </td>
</tr>";
$a++;
}
ini_set('display_errors', 1);
error_reporting(E_ALL & ~E_NOTICE);
if(isset($_POST['save'])){
if($dbc = @mysql_connect('localhost', '', '')){
if(!$dbc = @mysql_select_db('employees')){
die("<p> Could not select the database because:'.mysql_error().'</p>");
}
}
$b=0;
while ($b <= "2"){
$query = "INSERT INTO timesheet (num, name, norm, normhalf) VALUES ('{$_POST['enum']}', '{$_POST['ename']}', '{$_POST['time']}', '{$_POST['timehalf']}'";
$b++;
if(@mysql_query ($query)){
print "<p align='center'>The timesheet has been saved</p>";
}
else{
print"<p align='center'>Sorry. Unable to save details.</p>";
}
}
}
?>
</form>
</table>
</body>
</html>