title: How to close window after PHP code is executed?
body: <p>I have two problems:</p>
  <ol>
  <li><p>How do I close the window once I Have executed my PHP code which is a simple save textbox values to database?</p>
  </li>
  <li><p>How do I get my text boxes to align so they perfectly aligned currently one is more indented than the other <a href="http://jsfiddle.net/TGLzN" rel="nofollow noreferrer"><kbd>DEMO</kbd></a>?</p>
  </li>
  </ol>
  <p>Here's the PHP code that saves data into my database once saved I want the current window to close:</p>
  <pre><code>&lt;form name=&quot;Permit&quot; id=&quot;Permit&quot; action=&quot;&lt;?php echo JURI::current(); ?&gt;&quot; method=&quot;post&quot;&gt;
      Permit or Deny: &lt;input align= center  type=&quot;text&quot; name=&quot;Permit_or_Deny&quot; value=&quot;&quot;&gt;&lt;br&gt;
      Level &lt;input type=&quot;text&quot; name=&quot;Level&quot; value=&quot;&quot;&gt;&lt;br&gt;
      &lt;p&gt;&lt;input id=&quot;submit&quot; name=&quot;submit&quot; type=&quot;submit&quot; value=&quot;Permit Or Deny Submit Buutton&quot; /&gt;&lt;/p&gt;
  &lt;/form&gt;
          
       
  &lt;?
  if ((isset($_POST['Permit_or_Deny'])) || (isset($_POST['Level']))) {
      //first name or last name set, continue--&gt;
      $Permit_or_Deny = $_POST['Permit_or_Deny'];
      $Level          = $_POST['Level'];
      
      $db =&amp; JFactory::getDBO();
      $query = &quot;INSERT INTO tp_newedit (Permit_or_Deny, Level) VALUES ('&quot; . $Permit_or_Deny . &quot;','&quot; . $Level . &quot;');&quot;;
      
      $db-&gt;setQuery($query);
      $db-&gt;query();
  } else {
      echo '&lt;h4&gt;One Field Is Required!&lt;/h4&gt;';
  }
  ?&gt;
  </code></pre>