Forum Moderators: coopster
Anyway, you might try this instead..
if(mysql_num_rows($sql) == 0) {
print($countie);
while ($row = mysql_fetch_array($boo)){
// processing while
} // endWHILE
} // endIF
Is that what you had in mind? If not, what's on line 42?
You have an extra semicolon. You needed the braces for the logic but that was not why you got a parse error. Adding the braces changes the logic.
In the first case (no braces), it would print the message if the if condition were met and it would execute the while regardless.
In the second case, it prints the message and executes the while if the condition is met, and does nothing if $sql!= 0.
Your error message tells you where to look
"unexpected T_ELSE"
That means it was something wrong with an if/else sequence, so you know your if statement is wrong.