title: PHP Send ID from While statement to popup form
body: <p>I hava a list of data pulled in from a mysql database and displayed using the 'while' statement; which all works great. </p>
  
  <p>When a user clicks on the 'email' link, next to one of the displayed items, a popup form appears, with the idea of emailing/sending the item details to a friend.</p>
  
  <p>Now this all works great, but I can't seem to send the correct items' data to the form when the link is pressed. I'm guessing it could be because it's outside of the php but I don't want multiple instances of the same form being included in the while statement. As it is, there is only one form, I just need to be able to send the items id to it when the email link is pressed.</p>
  
  <p>Any help greatly appreciated, S.</p>
  
  <p>(stripped down code below)</p>
  
  <pre><code>&lt;?php                   
      $query = mysql_query("select * from istable where categoryID = '1'");       
      while ($result = mysql_fetch_array($query)) {               
      echo '&lt;h4&gt;'.$result['title'].'&lt;/h4&gt;
      &lt;p&gt;'.substr($result['descrip'],0,408).'... &lt;a href="'.$wwwUrl.'/p/'.$result['categoryID'].'-'.$result['title'].'.php""&gt;&lt;strong&gt;Read more&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
  
      &lt;div class="details"&gt;       
          &lt;a href="#" rel="#sheet" class="see"&gt;&lt;img src="'.$wwwUrl.'/images/email-icon.gif" width="23" height="23" alt="Email" /&gt; Email&lt;/a&gt;
          &lt;/div&gt;';        
      } 
  ?&gt; 
  
        &lt;div id="sheet" class="rounded"&gt;
        &lt;!--{{{ pane1 --&gt;
            &lt;div class="pane" id="pane1"&gt;
  
            &lt;h4&gt;Email Property Details to a Friend&lt;/h4&gt;            
            &lt;p&gt;You have selected to forward the details of &lt;?php echo $_GET['title']; ?&gt; to a friend.&lt;/p&gt;
            &lt;p&gt;Please fill out the following form&lt;/p&gt;
  
                &lt;form class="rounded" id="email-form" method="post" action="&lt;?php echo $pageLink; ?&gt;"&gt; 
                &lt;!-- form goes in here --&gt;                 
                &lt;/form&gt;   
            &lt;/div&gt;
            &lt;!--}}}--&gt;                
        &lt;/div&gt;
  </code></pre>