Help me debug this php/mysql statment

Soldato
Joined
9 May 2005
Posts
7,400
Location
Berkshire
I've been staring at this bit of php & sql for ages now, can any one see what's wrong with it?
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:
Jonno I tried your suggestion and it's behaving exactly the same as how I had it before. To add to that it's also no longer displaying who last handled the task.
 
Last edited:
Back
Top Bottom