Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i would like to hide this error div and only show when login fails

XML
<div class="shell-error">
        <!-- Message Error -->
            <div type="hidden" class="msg msg-error">
                <p><strong><?php echo $error_message; ?></strong></p>
                <a href="#" class="close">close</a>
            </div>
    <!-- End Message Error -->
        </div>
Posted

1 solution

Just wrap your code in an if statement.

PHP
<?php
if($login_failed == true)
{
?>
<div class="shell-error">
        <!-- Message Error -->
            <div type="hidden" class="msg msg-error">
                <p><?php echo $error_message; ??></p>
                <a href="#" class="close">close</a>
            </div>
    <!-- End Message Error -->
        </div>
<?php
}
?>
 
Share this answer
 
v2
Comments
Nico_Travassos 16-Oct-13 16:36pm    
does not work because the if statment does not pick up $login failed
look at my login code below and tell me what should i put in if statement
Nico_Travassos 16-Oct-13 18:21pm    
sorted it out
Captain Price 16-Oct-13 23:11pm    
i'm glad.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900