title: Popup in a loop for php
body: <p>I would like to use a popup in for loop to permit to the user different number.</p>
  
  <p>The number of loop will be random.</p>
  
  <p>I try this code but I never get the first value only the second value (in this example, only 2 loop)</p>
  
  <pre><code>&lt;?php
  session_start();
  ?&gt;
  &lt;script language="JavaScript"&gt;
  
  function win1() {
      window.open("try.php","Window1","menubar=no,width=460,height=360,toolbar=no");
  }
  &lt;/script&gt;
  &lt;?php
  for($j = 1; $j &lt;= 2; $j++){
  
  $_SESSION["j"] = $j;
  ?&gt;
  &lt;p&gt;&lt;a href="javascript:win1()" onMouseOver="self.status='Open A Window'; return true;"&gt;&lt;b&gt;Open Window Example 1&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;
  &lt;?php
  echo $j;
  }
  ?&gt;
  </code></pre>
  
  <p>How can I do to have in the 1st link the 1st value and in the second link the second value?</p>