title: Password protection to enter to prestashop
body: <p>I'm trying to add a password protection form to index.php so people cannot enter the website without a password. I don't want to use htaccess for visual problems of htaccess.</p>
  
  <pre><code>&lt;?php
      if( !empty ($_POST['password'] ) ) {
          $password = "1234";
          $pw = md5($_POST['password']);
          $valid_password = md5($password);
          if( $pw != $valid_password ) {
              echo "Error! You do not have access to this websitesite.";
          } else {
              require(dirname(__FILE__).'/config/config.inc.php');
              Dispatcher::getInstance()-&gt;dispatch();
          }
      }else{
          echo '
          &lt;h2&gt; Please Type Your Password to Enter to the website. &lt;/h2&gt;
      &lt;form name="monkeybusiness" method="post" action="\index.php"&gt;
        &lt;input type="password" id="password" name="password /&gt;
        &lt;input type="submit" id="submit" value="Enter" /&gt;
      &lt;/form&gt;';
      }
  </code></pre>
  
  <p>but when enter the password I'm getting following error;</p>
  
  <pre><code>Forbidden
  
  You do not have permission to access this document.
  </code></pre>
  
  <p>Does anybody know what is the reason of this error?
  Thanks.</p>