title: Drop Down Select File And Include It into Same Page
body: <p>Tried to do this but it's only echoing the value not actually choosing the .php file to include into the same page. The code is below...</p>
  
  <pre><code>&lt;body&gt;
  &lt;form name="form1" method="POST" action="test.php"&gt;
  &lt;select name="select" onChange="document.form1.submit()"&gt;
   &lt;option selected&gt;Select an Industry&lt;/option&gt;
   &lt;option value="members"&gt;members&lt;/option&gt;
   &lt;option value="Female"&gt;Female Members&lt;/option&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  
  &lt;?php
  
  $file = $_POST['select'];
  echo $file;
  
  
  $path_file = $_SERVER['DOCUMENT_ROOT']/$file.php;
  if(file_exists($path_file))
  {
    echo("The file does not exist at: $path_file");
  }
  else
  {
    require_once($path_file);
  }?&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Once sorted I am hoping it will include a php file into the same page! Also need  a default page before changing it, so Members be the main page, then people can select Female to see just female etc.</p>