title: How to set the modal shows something based on a button click?
body: <p>I really want that my Modal shows something based on which button inside it i press, but i have no idea of how to do this. 
  Actually i tried to  use <code>if(isset($_POST['buttoname'])</code> </p>
  
  <p>but looks like this dowsn't work <a href="https://i.stack.imgur.com/adKFk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/adKFk.png" alt="Modal"></a>`</p>
  
  <p>This is my modal , i just want to place the content on the right side (which is white ) , but actually it doesn't work. </p>
  
  <p>Here's the code i tried to use </p>
  
  <pre><code>&lt;!-- Modal Settings --&gt;
    &lt;div class="modal fade" id="Settings" role="dialog"&gt;
      &lt;div class="modal-dialog"&gt;
  
        &lt;!-- Modal content--&gt;
        &lt;div class="modal-content"&gt;
          &lt;div class="modal-header" style="background-color: #d9534f;color:white !important;text-align: center;font-size: 30px"&gt;
            &lt;button type="button" class="close" data-dismiss="modal" style="background-color: #d9534f;color:white !important;text-align: center;font-size: 30px"&gt;&amp;times;&lt;/button&gt;
            &lt;h4 style="background-color: #d9534f;color:white !important;text-align: center;font-size: 30px"&gt;&lt;span class="fa fa-gear"&gt;&lt;/span&gt; Settings&lt;/h4&gt;
          &lt;/div&gt;
          &lt;div class="modal-body"&gt;
              &lt;div class="container"&gt;
          &lt;div class="list-group col-sm-1"&gt;
          &lt;form method="post" href="#"&gt;
          &lt;button type="submit" name="Profile" href="#" class="list-group-item"&gt;First &lt;/button&gt;
          &lt;button type="submit" name="Logins" href="#" class="list-group-item"&gt;First &lt;/button&gt;
          &lt;button type="submit" name="Security" href="#" class="list-group-item"&gt;First &lt;/button&gt;
          &lt;/form&gt; 
          &lt;/div&gt; &lt;!-- List --&gt;
          &lt;/div&gt;
          &lt;?php 
          if(isset($_POST['Profile'])){
  
          echo' &lt;div class="container"&gt;
          &lt;div class="col-sm-11"&gt;
          &lt;p&gt; This is a test&lt;/p&gt;
          &lt;/div&gt;
          &lt;/div&gt;';
  
                                  }
  
  
  
  
  
                                      ?&gt;    
  
  
          &lt;/div&gt;
          &lt;div class="modal-footer" style="background-color: #f9f9f9;"&gt;
            &lt;button type="submit" class="btn btn-danger btn-default pull-left" data-dismiss="modal"&gt;&lt;span class="glyphicon glyphicon-remove"&gt;&lt;/span&gt; Cancel&lt;/button&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
      &lt;/div&gt;
    &lt;/div&gt; 
    &lt;!-- Modal Settings --&gt;
  </code></pre>