Bootstrap3,Popover,PHP - 联系表格里面破碎,和Popover打破内容

<a class="btn btn-primary" id="popover">xxx</a></li>
                                                            <div id="popover-head" class="hide"><h3 class="popover-title" style="color:#333;">xxx</h3></div>
                                                            <div id="popover-content" class="hide">
<?php  
            // check for a successful form post  
            if (isset($_GET['s'])) echo "<div class=\"alert alert-success\">".$_GET['s']."</div>";  
            // check for a form error  
            elseif (isset($_GET['e'])) echo "<div class=\"alert alert-danger\">".$_GET['e']."</div>";  
        ?>
        <form role="form" method="POST" action="*.php">
              <div class="row">
                <div class="form-group col-lg-12">
                    <label for="input1">Name</label>
                    <input type="text" name="contact_name" class="form-control" id="input1">
                </div>
              </div>
              <div class="row">
                <div class="form-group col-lg-12">
                    <label for="input2">Email Address</label>
                    <input type="email" name="contact_email" class="form-control" id="input2">
                </div>
              </div>
              <div class="row">
                <div class="form-group col-lg-12">
                    <label for="input3">Phone Number</label>
                    <input type="phone" name="contact_phone" class="form-control" id="input3">
                </div>
              </div>
              <div class="clearfix"></div>
                <div class="form-group col-lg-12">
                    <label for="input4">We will be in touch soon!</label>
                    <textarea name="contact_message" rows="6" style="display:none" class="form-control" id="input4">xxx</textarea>
              </div>
              <div class="form-group col-lg-12">
                <input type="hidden" name="save" value="contact">
                <button type="submit" class="btn btn-primary">Submit</button>
              </div>
          </div>
        </form>

I have 2 problems with this code. The first problem is that when I insert the form into the bootstrap3 popover, it breaks. The second problem is that the popover will not open. The popover does open if I remove the code from it, and the php script runs if it is not inside the popover.

One don´t even needs a popover.This simple code of mine ALSO breaks Bootstrap 3 completely !

<form class="navbar-form navbar-left" name="contact" action="<?php echo $_SERVER('PHP_SELF'); ?>" method="get">
    <div class="form-group">
      <p>
        <label for="name">Name</label>
        <input type="text" name="name" id="name">
      </p>
      <p>
        <label for="email">Email</label>
        <input type="text" name="email" id="email">
      </p>
      <p>
        <label for="comments">Comments</label>
        <textarea name="comments" id="comments"></textarea>
      </p>
    </div>
    <p>
      <input type="submit" name="send" id="send" value="Send Comments">
    </p>
  </form>
  <?php 
if($_GET){
        echo "Contents of the $_GET array<br >";
        print_r($_GET);
    }elseif ($_POST){
                        echo "Contents of the $_POST array<br >";
        print_r($_POST);
        }

?>