html - Bootstrap error messages aren't working with php if -
this question has reply here:
bootstrap - alert-error doesn't work 3 answersi using twitter bootstrap 3 , want show error messages based on specific conditions. using:
<?php if ($credits < 100) { ?> <div id="alert"class="alert alert-error"> error occured! </div> <?php } else { ?> <div id="alert" class="alert alert-success"> no error occured. </div> <?php } ?>
if $credits less 100, displays displays some error occured! (with white bg) , so, "alert alert-error" doesn't anything. if $credits more 100 displays no error occured. greenish success bg.
how can prepare it?
i used
alert alert-danger
instead of
alert alert-error
and working :)
html css twitter-bootstrap-3
No comments:
Post a Comment