title: HTML form action doesn't find my PHP file
body: <p>I'm building a simple message sending service with HTML, PHP, and MySQL.</p>
  <pre><code>guestbook       --- directory
   ㄴ addMessage.php
   ㄴ guestbook.php
  ...
  index.php
  </code></pre>
  <p>at index.php, I included <code>guestbook.php</code> to use functionality in that file.</p>
  <pre class="lang-php prettyprint-override"><code>
      &lt;?php include(&quot;./guestbook/guestbook.php&quot;) ?&gt;
  
  </code></pre>
  <p>at <code>guestbook.php</code>, I made a simple form to allow writing messages for only logged user, and the data will be send to <code>addMessage.php</code> as I wrote in the code.</p>
  <pre class="lang-php prettyprint-override"><code>&lt;div style=&quot;position:absolute; top: 15%; left:25%; width:50%;&quot;&gt;
  
      &lt;form action=&quot;addMessage.php&quot; method=&quot;post&quot;&gt;
  
          &lt;div class=&quot;form-group&quot;&gt;
              &lt;label for=&quot;exampleFormControlTextarea1&quot;&gt;Write some message!&lt;/label&gt;
              &lt;?php
              if (isset($_SESSION['id'])) {
  
                  echo '&lt;textarea class=&quot;form-control&quot; name=&quot;message&quot; id=&quot;exampleFormControlTextarea1&quot; rows=&quot;3&quot; placeholder=&quot;~~~~&quot;&gt;&lt;/textarea&gt;';
                  echo '&lt;button type=&quot;submit&quot; class=&quot;btn btn-primary&quot;&gt;write message&lt;/button&gt;';
  
              } else {
  
                  echo '&lt;textarea class=&quot;form-control&quot; id=&quot;exampleFormControlTextarea1&quot; rows=&quot;3&quot; placeholder=&quot;You should login first&quot; readonly&gt;&lt;/textarea&gt;';
                  echo '&lt;button type=&quot;submit&quot; class=&quot;btn btn-primary&quot; disabled&gt;write message&lt;/button&gt;';
  
              }
              
          ?&gt;
          &lt;/div&gt;
  
      &lt;/form&gt;
  
  &lt;/div&gt;
  </code></pre>
  <p>and <code>addMessage.php</code>, I put only one line of code to check whether it works.</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
      // $conn = mysqli_connect(&quot;localhost&quot;, &quot;alphatrox&quot;, &quot;alphatrox&quot;, &quot;cryptogame&quot;);
  
      // for test
      echo $_POST[&quot;message&quot;];
  
  ?&gt;
  </code></pre>
  <p>But when I send a message, I meet the error message that the <code>addMessage.php</code>(the URL was <code>http://localhost/addMessage.php</code>.) does not exist even I created it in the same directory.</p>
  <pre><code>Not Found
  The requested URL was not found on this server.
  
  Apache/2.4.52 (Win64) OpenSSL/1.1.1m PHP/8.1.2 Server at localhost Port 80
  </code></pre>
  <p>Can you tell me what I'm doing wrong?
  I'm facing trouble...</p>
  <p>thank you.</p>