It get stranger... originally I was going to call the function 5 times, but that didn't work.. so I created a loop inside the function so only on call was needed but Inow get the error :cannot redeclare gd() (yes I have renamed the function also.
below is the code:
Function GD($db, $EmpID)
{
$DBcon = $db;
$EID = $EmpID;
// create an array with the days
$Day = array("Saturday", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday");
For ($i=0; $i<6; $i++)
{
$sql_t1 = "SELECT Start, Stop
FROM Timesheet
WHERE EmployeeID=$EID
AND Day=";
echo"<td width=\"61\" valign=\"top\"><table width=\"61\" border=\"0\" class=\"thdr_s\">";
$sql_t = $sql_t1 . "'" . $Day[$i] ."'";
$qry_t = mysql_query($sql_t,$DBcon);
while ($myrow = mysql_fetch_array($qry_t))
{
echo"<tr><td>" . $myrow["Start"] . " - " . $myrow["Stop"] . "<br></td></tr>";
}
echo"</table></td>";
}
return;
}
echo (GD($db, $EmpID));