title: jQuery / Colorbox - Pass one java variable to PHP variable in popup
body: <p>Will you please please tell me how to get java variable "data_id" value in PHP Variable "$gal_id" i m not able pass the value of java variable into PHP Variable so please also let me know if you find the solution</p>
  
  <p><strong>JS IN Head</strong></p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/jquery.colorbox.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function(){
  //Examples of how to assign the Colorbox event to elements
  
  $(".inline").colorbox({inline:true, width:"70%", height:"500px;"});
  });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;li&gt;&lt;a class='inline' href="#inline_content" data-id="1"&gt;ABC&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class='inline' href="#inline_content" data-id="2"&gt;DEF&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class='inline' href="#inline_content" data-id="3"&gt;XYZ&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p><strong>POPUP Box</strong></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $('.inline').click(function(){
     var data_id = $(this).data('id');
     $('#idvalue').html(""+data_id);
  });
  &lt;/script&gt;
  
  &lt;div style='display:none'&gt;
      &lt;div id='inline_content'&gt;
      &lt;span id="idvalue"&gt;&lt;/span&gt;&lt;!--we'll get here data_id value of clicked list in output --&gt;
      &lt;?php
      $gal_id = ""; // Will you please please tell me how to get java variable "data_id" value here from above js
      $check = mysql_query("select * from img where id = '$gal_id'");
      while ($run = mysql_fetch_array($check)){
  
      .
      .
      .
      }?&gt;
  
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>