View Single Post
  #2  
Old 04-16-2016, 03:23 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 137,055
Kyttias is on a distinguished road
Default

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.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 04-16-2016 at 03:26 PM.
Reply With Quote