Why am I getting syntax error, unexpected ‘endwhile’ (T_ENDWHILE) in this template? [closed]

You are missing an <?php endif; ?>

[...]

else:
echo 'Sorry, only registered users can view this information';

endif;

<?php endwhile; // end of the loop. ?>

[...]

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)