title: PHP script not executing upon HTML Form 'Submission'
body: <p>I am building a website form in HTML that I want to gather information from users, and store it in MySQL. However, when I submit the form after entering the information, the PHP script is not executed. It simply displays the PHP script in raw form. In a browser, it downloads the PHP file. </p>
  
  <p>At first, I was lead to believe that this was an issue with my MySQL, PHP, Apache configuration, but after following <a href="http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/" rel="nofollow">this</a> step by step, I still cannot execute the PHP script. </p>
  
  <p>My form's header looks like so:</p>
  
  <pre><code>&lt;form id="form-settings" method="post" action="file.php"&gt;
  </code></pre>
  
  <p>file.php being the script I want to execute upon submission.</p>
  
  <p>Here is my PHP script:</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL);
  
  $link = mysql_connect("localhost","username","password");
  
  if (!$link) 
  {
         die('Not connected : ' . mysql_error());
  }
  
  mysql_select_db("mysql", $link) or die("Unable to select database");
  
  $var1=$_POST['var1'];
  $var2=$_POST['var2'];
  $var3=$_POST['var3'];
  $var4=$_POST['var4'];
  $var5=$_POST['var5'];
  
  $query = "INSERT INTO table VALUES ('','$var1','$var2','$var3','$var4','$var5')";
  mysql_query($query);
  
  mysql_close($link); ?&gt;
  </code></pre>
  
  <p>I can execute PHP files from the Terminal fine. I can query my MySQL table and enter info into it, but when I try to run it via the HTML form, it doesn't work. The Vars are values pulled form the HTML form. Any advice would be greatly appreciated. Obviously, the php is not being recognized, but where does this issue arise from?</p>