I am trying to program a sub-system for students on my website, I tried using these if/else statements to determine some outputs if the parameters match with the user information they have. So if a user is a student they can contact other people that are students and cant contact other users that are not students, and vice versa. The code I tried is below. The problem is that the code shows the error message and the message buttons at the same time whether or not the user is or is not a student. TIP: This PHP code is in a .phtml file, hence the amount of PHP opening and closing tags.

```
<?php if($dc['user']['student'] !== 0){ ?>
    <?php if(Dc_IsStudent($dc['popover']['user_id']) == true){ ?>
        <div class="user-button user-follow-button"><?php echo Dc_GetFollowButton($dc['popover']['user_id']); ?></div>
        <div class="user-button message-button"><?php echo Dc_GetMessageButton($dc['popover']['user_id']); ?></div>
    <?php } ?>

    <?php if(Dc_IsStudent($dc['popover']['user_id']) == false) { ?>
        <?php echo $dc['lang']['student_contact_warning'];  ?> 
    <?php } ?>
<?php } ?>

<?php if($dc['user']['student'] !== 1){ ?>
    <?php if(Dc_IsStudent($dc['popover']['user_id']) == false){ ?>
        <div class="user-button user-follow-button"><?php echo Dc_GetFollowButton($dc['popover']['user_id']); ?></div>
        <div class="user-button message-button"><?php echo Dc_GetMessageButton($dc['popover']['user_id']); ?></div>
    <?php } ?>

    <?php if(Dc_IsStudent($dc['popover']['user_id']) == true) { ?>
        <?php echo $dc['lang']['student_contact_warning'];  ?> 
    <?php } ?>
<?php } ?>

```