title: php code after "if (isset($_POST..." is not running
body: <p>Exactly what the title says. My PHP written after an the an if statement to check if a text portion of a form has any value is not running. It works fine in one written earlier in my code, but not the second time.</p>
  
  <p>Here is my whole code:</p>
  
  <pre><code>&lt;?php include '../header.php'; include '../navigation.php'; ?&gt;
  
  &lt;div id="pageContent"&gt;
  
  &lt;form name="format" method="POST" action="phpFunctions.php"&gt;
      Please input date: 
      &lt;input type="date" name="date" value="&lt;?php echo date('Y-m-d'); ?&gt;" /&gt;
      &lt;input type="submit" name"submit1" value="Format" /&gt;
  &lt;/form&gt;
  
  &lt;?php
  
  if (isset($_POST['date'])) {
      $new_date = $_POST['date'];
      $date = new DateTime($new_date);
      echo 'M-D-Y Format: ' . $date-&gt;format('m-d-Y') . '&lt;br&gt;';
      echo 'D-M-Y Format: ' . $date-&gt;format('d-m-Y');
  }
  
  ?&gt;
  
  &lt;form name="stringStuff" method="POST" action="phpFunctions.php"&gt;
      Enter string:
      &lt;input type="text" name"yourString"&gt;
      &lt;input type="submit" name"submit2" value="Parse" /&gt;
  &lt;/form&gt;
  
  &lt;?php
  
  if (isset($_POST['yourString']) &amp;&amp; !empty($_POST['yourString'])) {
      echo 'ayyyyyy lmao';
      $new_string = $_POST['theString'];
      $trimmed_string = trim($new_string);
      echo 'ayyyyyy lmao';
      echo 'String Length: ' . strlen($new_string) . '&lt;br&gt;';
      echo 'Trim Whitespace: ' . $trimmed_string . '&lt;br&gt;';
      echo 'Lowercased: ' . strtolower($new_string) . '&lt;br&gt;';
      if(strpos($new_string, 'DMACC') !== false) {
          echo 'String contains DMACC';
      }
      else {
          echo 'String does not contain DMACC';
      }
  }
  
  ?&gt;
  
  &lt;/div&gt;
  
  &lt;?php include '../footer.php'; ?&gt;
  </code></pre>
  
  <p>The portion of the code that isn't working is this portion after what I mentioned</p>
  
  <pre><code>if (isset($_POST['yourString']) &amp;&amp; !empty($_POST['yourString'])) {
      echo 'ayyyyyy lmao';
      $new_string = $_POST['theString'];
      $trimmed_string = trim($new_string);
      echo 'ayyyyyy lmao';
      echo 'String Length: ' . strlen($new_string) . '&lt;br&gt;';
      echo 'Trim Whitespace: ' . $trimmed_string . '&lt;br&gt;';
      echo 'Lowercased: ' . strtolower($new_string) . '&lt;br&gt;';
      if(strpos($new_string, 'DMACC') !== false) {
          echo 'String contains DMACC';
      } else {
          echo 'String does not contain DMACC';
      }
  }
  </code></pre>