title: Page isn't working when insert data to mysql with PHP
body: <p>Good day. I have a simple html file with 2 button, when button clicked, it will input some data to database. Unfortunately, when the button is clicked, chrome displays <code>192.168.0.168 is currently unable to handle this request.HTTP ERROR 500</code></p>
  
  <p>The following is my html code snippet</p>
  
  <pre><code>&lt;form action="mode.php" method="POST"&gt;
  &lt;input style="background-color: green;" id="home" name="home" type="submit" value="HOME"&gt;&lt;/br&gt;
  &lt;input style="background-color: red;" id="away" name="away" type="submit" value="AWAY"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and this is the <code>mode.php</code> coding:</p>
  
  <pre><code>&lt;?php
  
     $dbhost = 'localhost:3036';
     $dbuser = 'xxx';
     $dbpass = 'abc1234';
     $conn = mysql_connect($dbhost, $dbuser, $dbpass);
  
     if(! $conn ) {
        die('Could not connect: ' . mysql_error());
     }
  if (isset($_POST['home'])) {
  $sql= insert into home_mode (id, status) value (null, "HOME");
  
  mysql_select_db('home_mode');
  
  $retval = mysql_query( $sql, $conn );
     if(! $retval ) {
        die('Could not enter data: ' . mysql_error());
     }
  
  echo "Mode changed to HOME";}
  ?&gt;
  </code></pre>
  
  <hr>
  
  <p>*I have tested the connection to MySQL with a test script and it's successful.
  Please assist, thank you!</p>