title: PHP Form/Post Output
body: <p>The <strong>HTML</strong> page</p>
  
  <pre><code>&lt;form action="test2.php" method="post"&gt;
  Name: &lt;input type="text" name="name"&gt;&lt;br&gt;
  &lt;input type="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and the <strong>test2.php</strong></p>
  
  <pre><code>&lt;?php
  $firstname = $_POST['name'];
  print("Name $firstname");
  ?&gt;
  </code></pre>
  
  <p>and it shows error</p>
  
  <blockquote>
    <p><strong>Notice: Undefined index: firstname in test2.php on line 7</strong></p>
  </blockquote>
  
  <p>This is a problem when i run it on my PHPstorm. PHP i am using is v7.1.3</p>
  
  <p>I don't know whats wrong.</p>
  
  <p><strong>INSERTING PICS</strong></p>
  
  <p><a href="https://i.stack.imgur.com/xC39F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xC39F.png" alt="HTML File"></a>
  <a href="https://i.stack.imgur.com/emEZt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/emEZt.png" alt="PHP File"></a></p>
  
  <p>This was using XAMPP and still same results</p>