title: Submit form, close popup window and refresh parent page
body: <h2>popup1.php</h2>
  
  <pre><code>&lt;script&gt;
  function pepz(pageURL, title,w,h) {
  var left = (screen.width/2)-(w/2);
  var top = (screen.height/2)-(h/2);
  var targetWin = window.open (pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
  } 
  &lt;/script&gt;
  
  &lt;a href="" onclick="pepz('&lt;?php echo"popup2.php"; ?&gt;', 'myPop1',465,410)"&gt;&lt;?php print"Click"; ?&gt;&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <h2>popup2.php</h2>
  
  <pre><code>&lt;form action='#' method='post'&gt;
  &lt;input type='submit'&gt;
  &lt;form&gt;
  </code></pre>
  
  <hr>
  
  <p>After clicking the submit button in a form in a popup, I need the popup to close and the parent page which called the popup to refresh. </p>
  
  <p>What am i doing wrong? thank you :D</p>