I've been staring at this bit of php & sql for ages now, can any one see what's wrong with it?
It's designed to show the user if a task they have to do is either Complete, Overdue, Working, Rejected or Open. Problem is it's showing Open where it should be showing Overdue.
I'm sure it's a straight forward fix but I'm really not seeing it. Any ideas?
Code:
<?php
if ($myrow['completed'] == "1")
echo "Complete: ";
elseif ($myrow['date'] < $curdate && $myrow['completed'] == "0")
echo "Overdue";
elseif ($myrow['completed'] == "2")
echo "Working: ";
elseif ($myrow['completed'] == "3")
echo "Rejected: ";
else
echo "Open";
echo ($myrow['compby']);
?>
It's designed to show the user if a task they have to do is either Complete, Overdue, Working, Rejected or Open. Problem is it's showing Open where it should be showing Overdue.
I'm sure it's a straight forward fix but I'm really not seeing it. Any ideas?
Last edited: