title: sending form information by POST method , cause a 404 error while working on local server
body: <p>I'm new in PHP and I'm learning.
  I have a problem , I searched the questions like mine , but I didn't find my answer.</p>
  
  <p>an addition the others who asked question like mine were working on a server , but I'm learling and I work on a local server.</p>
  
  <p>these made me create a new question , so please help me</p>
  
  <p>at first let me describe what I am using:(it may help)</p>
  
  <p>I'm using:</p>
  
  <hr>
  
  <p>PhpStorm 2016.3</p>
  
  <p>Build #PS-163.7743.50, built on November 22, 2016</p>
  
  <p>JRE: 1.8.0_51-b16 amd64</p>
  
  <p>JVM: Java HotSpot(TM) 64-Bit Server VM by Oracle Corporation</p>
  
  <hr>
  
  <p>I created a new php project.</p>
  
  <p>I set PHP language level to 5.6
  and I addressed the CLI Interpreter to the php.exe file , in php folder , in XAMPP folder which I have already downloaded.</p>
  
  <p>so my php executable address is:
  C:\xampp\php\php.exe</p>
  
  <p>as following image , I did not set Debugger extension</p>
  
  <p><a href="https://i.stack.imgur.com/hJRZS.jpg" rel="nofollow noreferrer">PHP Executable adress</a></p>
  
  <p>Now I Describemy problem: </p>
  
  <p>during learning I saw a simple example  about sending a form information by 2 available methods: POST and GET</p>
  
  <p>here is the my form (in myHTML.html file):</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;POST and GET method Test&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form action="myphp.php" method="get"&gt;
      &lt;input type="text" name="name" autofocus placeholder="I am..." value=""     REQUIRED&gt;
      &lt;input type="submit" value="OK"&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>as you see , the method is set to : get.
  here I have no problem, I fill in the blank with a name , and click on button, the second page appears and says:
  you are : ( the name which is entered).</p>
  
  <p>he re is the myPHP.php file:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;POST and GET method Test&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;p&gt;you are: &lt;?php echo $_GET["name"]; ?&gt;&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>but when I set the form method to POST , and change the bellow line:</p>
  
  <pre><code>&lt;p&gt;you are: &lt;?php echo $_GET["name"]; ?&gt;&lt;/p&gt;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;p&gt;you are: &lt;?php echo $_POST["name"]; ?&gt;&lt;/p&gt;
  </code></pre>
  
  <p>by clicking on the button , the browser generates a 404 page:</p>
  
  <p>in the below pic , I put 2 outputs of GET and POST:</p>
  
  <p><a href="https://i.stack.imgur.com/9OKhJ.jpg" rel="nofollow noreferrer">Output</a></p>
  
  <p>I dont know whats going wrong?!</p>
  
  <p>in additional testing I figured that its not important what code is in myphp.php file!</p>
  
  <p>I changed content of myphp.php file to:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;Post Test&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;!--    &lt;p&gt;you are: --&gt;&lt;?php //echo $_POST["name"]; ?&gt;&lt;!--&lt;/p&gt;--&gt;
  
  Nothing!!!
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>just setting the form method  to POST cause a 404 ERROR!</p>
  
  <p>please help.</p>