title: Inserting correctly into database pdo
body: <p>I am having issues getting the SteamID and vac added to the database everything else is working just can not get these two. Here is my code. The connection information to the database is within the config.php I am not having any problems connecting just inserting correctly. Matter if fact it does not insert at all right now.</p>
  
  <pre><code>&lt;?php
  require 'config/config.php';
  class SteamProfile{
      const STEAMAPI_URL_MASK = 'http://steamcommunity.com/profiles/%s/?xml=1';
      const UNKONWN_NAME_MASK = 'User #%s (Username Not Found)';
      private $steamId;
      private $xml;
      public function __construct($steamId){
          $this-&gt;steamId = $steamId;
      }
      public function getUsername(){
          $xml = $this-&gt;getXml($this-&gt;steamId);
          return $xml-&gt;steamID ? (string)$xml-&gt;steamID : sprintf(self::UNKONWN_NAME_MASK, $this-&gt;steamId);
      }
      private function getXml($steamId){
          if ($this-&gt;xml){
              return $this-&gt;xml;
          }
          $url = sprintf(self::STEAMAPI_URL_MASK, $steamId);
          if (!$xml = simplexml_load_file($url)){
              throw new UnexpectedValueException(sprintf('Unable to load XML from "%s"', $url));
          }
          return $this-&gt;xml = $xml;
      }
      public function getVAC(){
          $xml = $this-&gt;getXml($this-&gt;steamId);
          return $xml-&gt;vacBanned;
      }
      public function __toString(){
          return sprintf("%s (SteamID: %s)", $this-&gt;getUsername(), $this-&gt;steamId);
      }
  }
  if (empty($_POST)){
  ?&gt;
  &lt;form name="banlist" action="index.php" method="POST"&gt;
  &lt;label for "SteamID"&gt;Steam64ID: &lt;/label&gt;&lt;input type="text" name="SteamID"/&gt;&lt;br /&gt;
  &lt;label for "bandate"&gt;Ban Until: &lt;/label&gt;&lt;input type="text" name="bandate"/&gt;&lt;br /&gt;
  &lt;button type="submit"&gt;Submit&lt;/button&gt;
  &lt;/form&gt;
  &lt;?php 
  }
  else{
      $form = $_POST;
      $SteamID = $form['SteamID'];
      $profile = new SteamProfile($SteamID);
      $namecheck = $profile-&gt;getUsername();
      $vac = $profile-&gt;getVAC();
      $bandate = $form['bandate'];
      $dbh = new PDO("mysql:host=$hostname;dbname=$dbname;",$username,$password);
      $sql = "INSERT INTO PlayerBans (SteamID, playername, vac, bandate)VALUES(:SteamID, :namecheck, :vac, :bandate)";
      $query = $dbh-&gt;prepare($sql);
      $result = $query-&gt;execute(array(':SteamID'=&gt;$SteamID, ':namecheck'=&gt;$namecheck, ':vac'=&gt;$vac, ':bandate'=&gt;$bandate));
      if ($result){
          echo "Thanks for showing us this ban!";
      } else {
          echo "Sorry, an error occurred while editing the database. Contact the guy who built this garbage.";
      }
  }
  ?&gt;
  </code></pre>
  
  <p>I have no idea what is going wrong as I am not uses to trying to use PDO</p>