title: PHP Form Submits Info Twice
body: <p>I have a perfectly working PHP form and until the other day it only submitted the results once to the database. I have not changed the code and suddenly it is submitting all results twice for an unknown reason. I've google it and can't find the issue. Here is my code:</p>
  
  <pre><code>&lt;?php
  $jinput = JFactory::getApplication()-&gt;input;
  if(isset($_POST['submit'])) {
      $db = JFactory::getDbo();
      $query = $db-&gt;getQuery(true);
      $user = JFactory::getUser();
      $userID = $user-&gt;get( 'id' );
      $date = date("Y/m/d");
      $description = $jinput-&gt;get('description', null , null);
      $subsection = $jinput-&gt;get('subsection', null , null);
      $urgency = $jinput-&gt;get('urgency', null , null);
      $status = "Waiting Attention";
      $columns = array('userid', 'rdate', 'description', 'area', 'subsection', 'urgency', 'status');
      $values = array($userID, $db-&gt;quote($date), $db-&gt;quote($description), $db-&gt;quote($selected), $db-&gt;quote($subsection), $db-&gt;quote($urgency), $db-&gt;quote($status));
      $query
          -&gt;insert($db-&gt;quoteName('#__website_issues'))
          -&gt;columns($db-&gt;quoteName($columns))
          -&gt;values(implode(',', $values));
      $db-&gt;setQuery($query);
      $db-&gt;execute();
      echo "&lt;h4&gt;Thank You! Issue Successfully Reported!";
  }
  echo "&lt;table style='text-align:center;text-align:center;margin-left:41%;'&gt;";
  echo "&lt;tr&gt;&lt;td&gt;&lt;h4&gt;Report Website Issue&lt;/h4&gt;&lt;/td&gt;&lt;/tr&gt;";
  echo "&lt;tr&gt;&lt;td&gt;&lt;form method='post'&gt;&lt;select name='area'  onchange='this.form.submit()'&gt;
  &lt;option value=''&gt;Select Website Area&lt;/option&gt;
  &lt;option value='General'&gt;General&lt;/option&gt;
  &lt;option value='Emails'&gt;Emails&lt;/option&gt;
  &lt;option value='Education'&gt;Education&lt;/option&gt;
  &lt;option value='Reviews'&gt;Reviews&lt;/option&gt;
  &lt;option value='Store'&gt;Store&lt;/option&gt;
  &lt;option value='Toolkit'&gt;Toolkit&lt;/option&gt;
  &lt;option value='Membership'&gt;Membership&lt;/option&gt;
  &lt;option value='Other'&gt;Other&lt;/option&gt;
  &lt;/select&gt;&lt;/form&gt;
  &lt;/td&gt;&lt;/tr&gt;";
  echo "&lt;form method='post'&gt;";
  $selected = $jinput-&gt;get('area', null, null);
  echo "&lt;tr&gt;&lt;td&gt;&lt;h5&gt;&lt;center&gt;Current Area Selected: $selected&lt;/center&gt;&lt;/tr&gt;&lt;/td&gt;&lt;/h5&gt;";
  if($selected == 'General') {
      echo "&lt;tr&gt;&lt;td&gt;&lt;input type='text' name='subsection' placeholder='Subsection'&gt;&lt;/td&gt;&lt;/tr&gt; ";
  }
  else if($selected == 'Emails') {
      echo "&lt;tr&gt;&lt;td&gt;&lt;select name='subsection'&gt;
      &lt;option value=''&gt;Select Email System&lt;/option&gt;
      &lt;option value='Contact Error'&gt;Contact Emails&lt;/option&gt;
      &lt;option value='Notification'&gt;Notifications&lt;/option&gt;
      &lt;option value='Newsletter'&gt;Newsletter&lt;/option&gt;
      &lt;option value='Store'&gt;Store Emails&lt;/option&gt;
      &lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;";
  }
  else if($selected == 'Education') {
      echo "&lt;tr&gt;&lt;td&gt;&lt;select name='subsection'&gt;
      &lt;option value=''&gt;Select Subsection&lt;/option&gt;
      &lt;option value='Lighting'&gt;Lighting&lt;/option&gt;
      &lt;option value='Sound'&gt;Sound&lt;/option&gt;
      &lt;option value='Rigging'&gt;Rigging&lt;/option&gt;
      &lt;option value='Stage Management'&gt;Stage Management&lt;/option&gt;
      &lt;option value='Console Training'&gt;Console Training&lt;/option&gt;
      &lt;option value='Video'&gt;Video&lt;/option&gt;
      &lt;option value='Media &amp; Projection'&gt;Media &amp; Projection&lt;/option&gt;
      &lt;option value='Church'&gt;Church&lt;/option&gt;
      &lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;";
  }
  else if($selected == 'Reviews') {
      echo "&lt;tr&gt;&lt;td&gt;&lt;input type='text' name='subsection' placeholder='Specific Review'&gt;&lt;/td&gt;&lt;/tr&gt; ";
  }
  else if($selected == 'Store') {
      echo "&lt;tr&gt;&lt;td&gt;&lt;input type='text' name='subsection' placeholder='Store Area'&gt;&lt;/td&gt;&lt;/tr&gt; ";
  }
  else if($selected == 'Toolkit') {
      echo "&lt;tr&gt;&lt;td&gt;&lt;input type='text' name='subsection' placeholder='Specific Tool'&gt;&lt;/td&gt;&lt;/tr&gt; ";
  }
  else if($selected == 'Membership') {
      echo "&lt;tr&gt;&lt;td&gt;&lt;select name='subsection'&gt;
      &lt;option value=''&gt;Select Membership Plan&lt;/option&gt;
      &lt;option value='Member'&gt;Member&lt;/option&gt;
      &lt;option value='Student'&gt;Student&lt;/option&gt;
      &lt;option value='Educator'&gt;Educator&lt;/option&gt;
      &lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;";
  }
  else if($selected == 'Other') {
      echo "&lt;tr&gt;&lt;td&gt;&lt;input type='text' name='subsection' placeholder='Subsection'&gt;&lt;/td&gt;&lt;/tr&gt; ";
  }
  echo "&lt;tr&gt;&lt;td&gt;&lt;select name='urgency'&gt;
  &lt;option value=''&gt;Select Urgency&lt;/option&gt;
  &lt;option value='Minor'&gt;Minor&lt;/option&gt;
  &lt;option value='Serious'&gt;Serious&lt;/option&gt;
  &lt;option value='Urgent'&gt;Urgent&lt;/option&gt;
  &lt;/select&gt;&lt;/td&gt;&lt;/tr&gt;";
  echo "&lt;tr&gt;&lt;td&gt;&lt;textarea rows='6' cols='50' name='description' placeholder='Please Describe The Issue'&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;/tr&gt;";
  // Submit
  echo "&lt;tr&gt;&lt;td&gt;&lt;input type='submit' class='btnsubmit' name='submit' value='Submit Issue'&gt;";
  echo "&lt;/form&gt;&lt;/table&gt;&lt;hr&gt;";
  ?&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Thanks in advance! </p>