title: Passing a variable from PHP loop to JQuery's modal via href link
body: <p>been trying for hours now to update the code I was given, and with no luck. I have tried bunch of example from this very page yet to no avail...</p>
  
  <p>I have a php loop that prints out some data, then upon clicking a 'view' link, a modal-box pops up displaying more information of given person. To display content of that modal box I use external php file so I thought it would be easy to pass a value and simply select and displayed all info from DB based on passed ID. So wrong I was...</p>
  
  <p>Here's what I have now:</p>
  
  <p>PHP:</p>
  
  <pre><code>&lt;tr&gt;
    &lt;td&gt;' . sel_db('*', 'guests', $row['guestID'], '3') . '&lt;/td&gt;
    &lt;td&gt;' . find_lounge($row['departureID']) . '&lt;/td&gt;
    &lt;td&gt;' . $row['flight_no'] . '&lt;/td&gt;
    &lt;td&gt;' . $row['arrival_time'] . '&lt;/td&gt;
    &lt;td&gt;&lt;a class="modalInput" rel="#details_view"&gt;View&lt;/a&gt;&lt;/td&gt;
    &lt;td class="cent"&gt;' . $thisBooking . '&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>And this little jquery:</p>
  
  <pre><code>&lt;script type="text/javascript" /&gt;
    var triggers = $(".modalInput").overlay({
  
    // some mask tweaks suitable for modal dialogs
    mask: {
      color: '#ebecff',
      loadSpeed: 200,
      opacity: 0.9
    },
  
    closeOnClick: true
   });
   $('#details_view').load('popup.php?ID=???');
  
   &lt;/script&gt;
  </code></pre>
  
  <p>plus the div inside the pure HTML page (the very same as the php code is):</p>
  
  <pre><code>  &lt;!-- Details popup --&gt;
      &lt;div class="modal" id="details_view"&gt;
        { here is loaded external php file }
    &lt;/div&gt;
  </code></pre>
  
  <p>The popup opens fine but there's no way I can display anything dynamic since I cannot grab that ID from the php loop.</p>
  
  <p>Can anyone help here, please?
  Any input will be much, much appreciated.</p>
  
  <p>Cheers,
  Greg Bialowas</p>