title: PHP Securely include files + handle invalid parameters
body: <p>I'm having a little problem. I want to securely include files based on the $_GET Parameter from a subdirectory + handle if the parameter is not valid.</p>
  
  <pre><code> &lt;?php
  if(isset($_GET['p']) &amp;&amp; $_GET['p'] == 'fahrzeuge'){
          include 'includes/cars.php';
      }
    if(isset($_GET['p']) &amp;&amp; $_GET['p'] == 'impressum'){
          include 'includes/impressum.php';
      }
      if(isset($_GET['p']) &amp;&amp; $_GET['p'] == 'home'){
              include 'includes/home.php';
          }
        if(isset($_GET['p']) &amp;&amp; $_GET['p'] == 'anfahrt'){
              include 'includes/anfahrt.php';
          }
          if(isset($_GET['p']) &amp;&amp; $_GET['p'] == 'about'){
                  include 'includes/about.php';
              }
  
  ?&gt;
  </code></pre>
  
  <p>This is my Code. Sorry I know it is a noob way of solving this. How can I improve it? Any Suggestions/Help would be highly appreciated</p>