2017-07-14 19:44 浏览 99


I just include this php tags just to check,that if the user is logged in or not.The modal is located in other page(login.php) . It was working fine without including the php tags."The whole thing is working fine except the navbar is not collapsing".Rate +ve if the question is not irrelevant.

          <div class="navbar-header">
          <button class="navbar-toggle" data-toggle="collapse" data-target=".collmenu"> 
             <span class="icon-bar img-reponsive"></span>
             <span class="icon-bar img-reponsive"></span>
             <span class="icon-bar img-reponsive"></span>
      <div class="collapse navbar-collapse collmenu">

            <ul class="nav navbar-nav navbar-right">
         if(!empty($loggedin)&&($loggedin=='true')){ echo'<li><a href="">logout</a></li>
               <li><a href="#">hello</a></li>';}

            else{echo'<li><a href="" data-toggle="modal" data-target="#loginmodal">Login</a></li>
                 <li><a href="pages/register.php">Signup</a></li>';}


  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答 默认 最新

  • 已采纳
    dpvp56187 dpvp56187 2017-07-14 20:52

    Please check for the files that you've included. Or is there any form exists in your this page linked to the navbar? check that you should not have included files twice, also check for the form action if any.

    点赞 评论 复制链接分享