title: PHP : How to put and pass variable in modal URL
body: <p>So, I have a button to give a direct link to modal in same page.</p>
  
  <p>this is the button and url</p>
  
  <pre><code>&lt;a data-toggle="modal" 
     href="main_user.php?user_id=&lt;?php echo $user['user_id']; ?&gt;#myModal" 
     class="btn btn-warning"&gt;
  </code></pre>
  
  <p>( I try to echo the <code>$user_id</code> on before <code>#modal</code> ) is it right ?</p>
  
  <p>and after I click the button, the modal will appear.
  This is the modal with the form.</p>
  
  <pre><code>&lt;form class="form-login" action="action/doEditUserStatus.php" method="post"&gt;
            &lt;div class="login-wrap"&gt;
                 &lt;div class="changestatus"&gt;
                     &lt;p&gt;Banning or Activing User Status&lt;/p&gt;&lt;/div&gt;
                          &lt;div class="btn-group" data-toggle="buttons"&gt;
                              &lt;label class="btn btn-success active"&gt;
                                 &lt;input type="radio" name="options" value="1" autocomplete="off"  checked&gt; Actived
                              &lt;/label&gt;
                              &lt;label class="btn btn-primary"&gt;
                                &lt;input type="radio" name="options" value="2" autocomplete="off"&gt; Banned
                              &lt;/label&gt;
                          &lt;/div&gt;
            &lt;/div&gt;
             &lt;div class="modal-footer"&gt;
                  &lt;button data-dismiss="modal" class="btn btn-default" type="button"&gt;Cancel&lt;/button&gt;
                  &lt;button class="btn btn-theme" name="modalSubmit" type="submit"&gt;Submit&lt;/button&gt;
             &lt;/div&gt;
      &lt;/form&gt;
  </code></pre>
  
  <p>And then I try to submit the modal form, but the action cannot read the <code>$user_id</code> which I put before <code>#modal</code>.</p>
  
  <p>UPDATE : 
  Table code :</p>
  
  <p>So this is my table :</p>
  
  <pre><code>&lt;tr class="success"&gt;
     &lt;th class="numeric"&gt;ID&lt;/th&gt;
     &lt;th class="numeric"&gt;E-mail&lt;/th&gt;
     &lt;th class="numeric"&gt;Name&lt;/th&gt;
     &lt;th class="numeric"&gt;Phone&lt;/th&gt;
     &lt;th class="numeric"&gt;Picture&lt;/th&gt;
     &lt;th class="numeric"&gt;Status&lt;/th&gt;
     &lt;th colspan="2" class="numeric"&gt;Action&lt;/th&gt;
  &lt;/tr&gt;
  
  
  &lt;tr&gt;
     &lt;td class="numeric"&gt;&lt;?php echo $user['user_id']; ?&gt;&lt;/td&gt;
     &lt;td class="numeric"&gt;&lt;?php echo $user['email']; ?&gt;&lt;/td&gt;
     &lt;td class="numeric"&gt;&lt;?php echo $user['name']; ?&gt;&lt;/td&gt;
     &lt;td class="numeric"&gt;&lt;?php echo $user['phone']; ?&gt;&lt;/td&gt;
     &lt;td class="numeric"&gt;&lt;?php echo $user['picture']; ?&gt;&lt;/td&gt;
     &lt;td class="numeric"&gt;
         &lt;a data-toggle="modal" href="main_user.php?user_id=&lt;?php echo $user['user_id']; ?&gt;#myModal" class="btn btn-warning"&gt;
            &lt;span class="glyphicon glyphicon-edit" aria-hidden="true"&gt;&lt;/span&gt;&amp;nbsp;Change Status
          &lt;/a&gt;
     &lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>The main problem is : 
  When I click the button, then the modal will appear but it can't get the <code>$user_id</code> from that button?</p>