title: HTML Form is showing up even though PHP "if" statement is not met
body: <p>I am quite new at programming (especially in PHP).
  Anyway, I have been attempting for a bit now to create a log-in page that utilizes both PHP and HTML.</p>
  
  <p>The main idea is if it's the first time the user has come to the log-in page, then they have to click a "submit" button first; which will then reload the page but now will have a  where the user will input information to call up another PHP script.</p>
  
  <p>I have attempted the following codes to achieve this:</p>
  
  <pre><code>          &lt;form method = "post"
                  action = "Sign-In2.html"&gt;
  
  
            &lt;p&gt;
            &lt;br /&gt;
              &lt;input type = "submit"
                     name = "returnUser"
                     value = "Click To Log In"&gt;
            &lt;/P&gt;
            &lt;/form&gt;
  
            &lt;?php
  
            if (isset($_POST['returnUser'])) {
  
            ?&gt;    
  
            &lt;form method = "post"
                  action = "Login2.php"&gt;
  
              &lt;p&gt;
              &lt;br /&gt;
              In Honor Of:
              &lt;input type = "text"
                     name = "userName"
                     value = ""&gt;
  
              &lt;br /&gt;
              EDGE Code:
              &lt;input type = "password"
                     name = "edgeCode"
                     value = ""&gt;
  
              &lt;br /&gt;&lt;br /&gt;
              &lt;input type = "checkbox"
                     name = "rememberUser"
                     value = "remembered"&gt;Remember Me
  
              &lt;br /&gt;
              &lt;input type = "submit"
                     value = "Log Me In"&gt;
  
              &lt;/p&gt;
              &lt;/form&gt;
  
            &lt;?php
  
            } else {
  
            } //end if
  
            ?&gt;
  </code></pre>
  
  <p>From everything I have read online (from this site and others), I am under the impression that my code includes two forms and a PHP "if" statement.</p>
  
  <p>The FIRST form just provides a "submit" button that is named "returnUser" and reloads the page (which is named Sign-In2.html).</p>
  
  <p>Then PHP jumps in and runs a condition check. If the "submit" button from the FIRST form has in fact been clicked, then the SECOND form will be run. If it has NOT been clicked, then nothing happens.</p>
  
  <p>SO MY ISSUE is that when I run this this code from localhost WAMPserver, BOTH forms show up! I am unable to understand or find out why not just the first form but both are showing up when I load the page! I just want the first submit button to show up so I can click on it and refresh the page with the input fields from the second form :(
  Any help would be highly appreciated!</p>
  
  <p>Note: The second form and its phpscript both run no problem.</p>