Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
session_start();
include('includes/header.html');
include('dbcon.php');


$query = "SELECT
employee.fname
, employee.lname
, employee.adays
, employee.mdays
, employee.cdays
, employee.ccdays
, employee.pdays
, employee.nsdays
, employee.mcdays
FROM
ccse.employee,
ccse.leaves


WHERE (employee.eid = leaves.eid) and employee.eid='$_GET[id]'";



$result = @mysql_query($query);



if($result){
echo "
";echo "
";
echo '
';

$bg = '#eeeeee';
while($row=mysql_fetch_array($result, MYSQL_ASSOC)){
$bg = ($bg == '#eeeeee' ? '#ffffff' : '#eeeeee');

echo '';
}
echo '
Your Current Balance/Leave Entitlement
Employee Name
Annual Leave (Days)
Ministry Leave (Days)
Compassionate Leave (Days)
Childcare Leave (Days)
Paternity/Maternity Leave (Days)
National Service(Days)
MC/Hospital Leave (Days)
'.$row['fname'].' '.$row['lname'].''.$row['adays'].''.$row['mdays'].''.$row['cdays'].''.$row['ccdays'].''.$row['pdays'].''.$row['nsdays'].''.$row['mcdays'].'
';
mysql_free_result($result);

}else{
echo '

'.mysql_error().'

Query:'.$query.'

';
}
mysql_close();
?>









require_once('includes/footer.html');
?>









Posted
Updated 2-Feb-14 15:45pm
v2
Comments
Sergey Alexandrovich Kryukov 2-Feb-14 21:44pm    
This is the code dump, not a question. The whole post makes no sense.
—SA

1 solution

First, you have to check if $_GET[id] exists;
if (isset($_GET['id'])){
// todo code
}

typo at line 22, change this:
employee.eid='$_GET[id]'"

to
employee.eid='".$_GET['id']."'"

This is as far as I could see, good luck.
 
Share this answer
 
v4

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900