title: INSERT command is not being executed?
body: <p>for school I need to replicate a order page of a Dutch ISP (i am dutch), I have made the form and the data is correctly placed in variables. But when I want to use PDO to execute the INSERT statement I am getting no new row in the designated table, and no clear error (I get 0000). The connection is fine because i use the same for other SELECT statements. I cant figure out what is going wrong. Any help is appreciated. Code is below:</p>
  
  <p>step3.php, the code is checking if the first 2 steps are executed ($_COOKIE order and user_data)</p>
  
  <pre><code>    &lt;?php
  
      include_once "pagelayout.php"; include_once "functions.php";
  
      boven("Stap 3 -- Bestellen Bij ..");
  
          if (isset($_COOKIE['order'])) {
  
              if (isset($_COOKIE['user_data'])) {
  
  ?&gt;
  
      &lt;img src="files/loading.GIF"&gt; &lt;br&gt; &lt;h3&gt; Verwerken bestelling.... &lt;/h3&gt;  &lt;p&gt; Een moment geduld &lt;/p&gt;          
      &lt;!-- &lt;meta http-equiv="refresh" content="10;URL='done.php'" /&gt; --&gt; 
  
  &lt;?php
  
              save_user_data();
  
              }
  
              else  { header('Location: step2.php');  } 
          }
  
          else { header('Location: index.php'); }
  
  
      beneden();
  
  
  ?&gt;
  </code></pre>
  
  <p>The functions are stored in functions.php:</p>
  
  <pre><code>function save_user_data() {
  
      $order_data = unserialize($_COOKIE['order']);
      $user_data = unserialize($_COOKIE['user_data']);
  
      $sqladres_postcode = $user_data['adres_postcode'];
      $sqladres_huisnummer = $user_data['adres_huisnummer'];
      $sqladres_straat = $user_data['adres_straat'];
      $sqladres_plaats = $user_data['adres_plaats'];
      $sqlpersoon_sex = $user_data['persoon_sex'];
      $sqlpersoon_voorletters = $user_data['persoon_voorletters'];
      $sqlpersoon_tussenvoegsel = $user_data['persoon_tussenvoegsel'];
      $sqlpersoon_achternaam = $user_data['persoon_achternaam'];
      $sqlpersoon_geboortedatum = $user_data['persoon_geboortedatum'];
      $sqlpersoon_email = $user_data['persoon_email'];
      $sqlpersoon_telefoonnummer = $user_data['persoon_telefoonnummer'];
      $sqlbetaling_bankrekening = $user_data['betaling_bankrekening'];
      $sqlorder_allinone = $order_data['allinone'];
      $sqlorder_extra = serialize($order_data['extra']);
      $sqlorder_benefit = $order_data['benefit'];
      $sqlorder_totalmonthPrice = $_COOKIE['totalmonthPrice'];
      $sqlorder_totaloncePrice = $_COOKIE['totaloncePrice'];
  
      include_once "connection.php";
  
      $verbinding = connection_klant();   
  
      $sql = "INSERT INTO klant (adres_postcode, adres_huisnummer, adres_straat, adres_plaats, persoon_sex, persoon_voorletters, persoon_tussenvoegsel, persoon_achternaam, persoon_geboortedatum, persoon_email, persoon_telefoonnummer, betaling_bankrekening, order_allinone, order_extra, order_benefit, order_totalmonthPrice, order_totaloncePrice) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
  
      $statement = $verbinding-&gt;prepare($sql); 
      $statement -&gt; bindValue (1, $sqladres_postcode, PDO::PARAM_STR);
      $statement -&gt; bindValue (2, $sqladres_huisnummer, PDO::PARAM_STR);
      $statement -&gt; bindValue (3, $sqladres_straat, PDO::PARAM_STR);
      $statement -&gt; bindValue (4, $sqladres_plaats, PDO::PARAM_STR);
      $statement -&gt; bindValue (5, $sqlpersoon_sex, PDO::PARAM_STR);
      $statement -&gt; bindValue (6, $sqlpersoon_voorletters, PDO::PARAM_STR);
      $statement -&gt; bindValue (7, $sqlpersoon_tussenvoegsel, PDO::PARAM_STR);
      $statement -&gt; bindValue (8, $sqlpersoon_achternaam, PDO::PARAM_STR);
      $statement -&gt; bindValue (9, $sqlpersoon_geboortedatum, PDO::PARAM_STR);
      $statement -&gt; bindValue (10, $sqlpersoon_email, PDO::PARAM_STR);
      $statement -&gt; bindValue (11, $sqlpersoon_telefoonnummer, PDO::PARAM_STR);
      $statement -&gt; bindValue (12, $sqlbetaling_bankrekening, PDO::PARAM_STR);
      $statement -&gt; bindValue (13, $sqlorder_allinone, PDO::PARAM_STR);
      $statement -&gt; bindValue (14, $sqlorder_extra, PDO::PARAM_STR);
      $statement -&gt; bindValue (15, $sqlorder_benefit, PDO::PARAM_STR);
      $statement -&gt; bindValue (16, $sqlorder_totalmonthPrice, PDO::PARAM_STR);
      $statement -&gt; bindValue (17, $sqlorder_totaloncePrice, PDO::PARAM_STR);
  
      echo $sql;
  
      $statement-&gt;execute();
  
      print_r($verbinding-&gt;errorInfo());
  
  
  }
  </code></pre>
  
  <p>Sql file to create database:</p>
  
  <pre><code>/*
  Navicat MySQL Data Transfer
  
  Source Server         : localhost
  Source Server Version : 50613
  Source Host           : localhost:3307
  Source Database       : klantendb
  
  Target Server Type    : MYSQL
  Target Server Version : 50613
  File Encoding         : 65001
  
  Date: 2014-05-11 16:37:55
  */
  
  SET FOREIGN_KEY_CHECKS=0;
  
  -- ----------------------------
  -- Table structure for `klanten`
  -- ----------------------------
  DROP TABLE IF EXISTS `klanten`;
  CREATE TABLE `klanten` (
    `adres_postcode` varchar(6) NOT NULL,
    `adres_huisnummer` varchar(100) NOT NULL,
    `adres_straat` varchar(100) NOT NULL,
    `adres_plaats` varchar(100) NOT NULL,
    `persoon_sex` varchar(100) NOT NULL,
    `persoon_voorletters` varchar(100) NOT NULL,
    `persoon_tussenvoegsel` varchar(100) DEFAULT NULL,
    `persoon_achternaam` varchar(100) NOT NULL,
    `persoon_geboortedatum` varchar(100) NOT NULL,
    `persoon_email` varchar(150) NOT NULL,
    `persoon_telefoonnummer` varchar(10) NOT NULL,
    `betaling_bankrekening` varchar(100) NOT NULL,
    `order_allinone` varchar(100) NOT NULL,
    `order_extra` varchar(100) DEFAULT NULL,
    `order_benefit` varchar(100) NOT NULL,
    `order_totalmonthPrice` varchar(100) NOT NULL,
    `order_totaloncePrice` varchar(100) DEFAULT NULL,
    `ID` int(10) NOT NULL AUTO_INCREMENT,
    PRIMARY KEY (`ID`)
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
  
  -- ----------------------------
  -- Records of klanten
  -- ----------------------------
  INSERT INTO `klanten` VALUES ('9999AA', '16', '', '', '', '', null, '', '', '', '', '', '', null, '', '', null, '3');
  </code></pre>
  
  <p>And the connection that is used:</p>
  
  <pre><code>function connection_klant() {
  
      $hostname_localhost  = "localhost";
      $port_localhost      = "3307";
      $database_localhost  = "klantendb";
      $username_localhost  = "root";
      $password_localhost  = "usbw";
  
      return new PDO("mysql:host=$hostname_localhost;dbname=$database_localhost;port=$port_localhost",$username_localhost,$password_localhost);
  </code></pre>