title: Calling php file from form
body: <p>I have an HTML form that I need to call a php script upon pressing submit but can't work out why the script isn't being executed.</p>
  
  <pre><code>&lt;form action="update.php" method="POST"&gt;    
  
  &lt;input name="id"  type="hidden" value="id"/&gt;
  &lt;input name="subArea"       type="text"     placeholder="Sub Area (optional)"/&gt;     
  &lt;label&gt;&lt;textarea name="description" rows="2" cols="80" placeholder="Description" &gt;&lt;/textarea&gt;&lt;/label&gt;   
  &lt;label&gt;&lt;input type="radio" name="markNA[]" value ="markNA"/&gt; N/A? &lt;/label&gt;
  
  &lt;input class = "btn-testname" type="submit" value="Change" name="update"/&gt; 
  &lt;/form &gt;
  </code></pre>
  
  <p>I don't need the page to reload when pressing the button (so want to avoid Ajax) It was my understanding  that the method above will execute the script?</p>
  
  <p>update.php</p>
  
  <pre><code>&lt;?php
  include ("databaseLogin.php");
  
  // Create connection to Database
  $con = mysqli_connect('localhost',$dbuser,$dbpass,$dbname);
  
  if (!$con) 
  {
      die('Could not connect: ' . mysqli_error($con));
  }
  
  // Sql Query
  $sql = "INSERT INTO `table_tests` (`active`, `description`) 
          VALUES (1, 'newstuff')";
  
  mysqli_query($con, $sql);
  ?&gt;
  </code></pre>
  
  <p>EDIT 1: I excluded the bringing in of the POST vars just to simplify the php code (and hard coded them into the sql query)</p>
  
  <p>If I'm just missing a stupid syntax error I apologise.</p>