populate data in parent window from a popup window , php
<p>i want populate data in parent window from a popup window. can any one help me pls.</p>

<p>POPUP window:</p>

<pre><code>        foreach ( $user_info as $key =&gt; $value) {
        echo   '&lt;label&gt; : &lt;input type="text" name="'.$key.'" id="'.$key.'" size="30" value="'.$value.'" &gt;'.$key .'&lt;/label&gt;&lt;br&gt;';
                 }
         echo '
                  &lt;script type="text/javascript"&gt;

                 function get_data (){
                 opener.document.forms[1].inputname.value = "new value"; 
                 window.close();
}

             &lt;/script&gt;

          ';
          echo '&lt;input type="button" name="submit" id="submit" size="30" value="submit" onclick="get_data();"&gt;';
</code></pre>

<p>above one is not working.</p>
