<?php $msgTxt = (isset($_GET['msg']) && $_GET['msg'] != '') ? $_GET['msg'] : ' '; $errTxt = (isset($_GET['err']) && $_GET['err'] != '') ? $_GET['err'] : ' '; $mCls = ""; $mFaCls = ""; if($msgTxt != ' ') {$mCls = 'success'; $mFaCls = 'check';} else if($errTxt != ' '){$mCls = 'danger'; $mFaCls = 'ban';} if($msgTxt != " " || $errTxt != " " ) { $dMsg = $msgTxt != " " ? $msgTxt : $errTxt; ?> <div class="alert alert-<?php echo $mCls; ?> alert-dismissable"> <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> <i class="icon fa fa-<?php echo $mFaCls; ?>"></i><?php echo $dMsg; ?> </div> <?php }//if ?>