Well, does $notdone hold the boolean value for true/false or a string with the words either "true" or "false" in it? There's a big difference. Try being more explicit with the value you're looking to fill.
PHP Code:
if ($notdone == "true"){ /* ... */ } else { /* ... */ }
Otherwise it'll just look to see if the variable holds any contents at all. Of course it does, so it runs the first statement. A string with the word "false" in it is still a variable with contents in it so it's always going to return a boolean of true. Variables pulled from the database are not explicitly boolean by default. You could always try storing values as 0 or 1 and they would register better, or, change the column type in the database.