if statement should be like this:
<?php if (....): ?>
...
<?php endif; ?>