title: Something with variables and parameters (Prepared statement)
body: <p>I encountered a problem while making a prepared statement using php and mysql. For some reason my variables aren't right.<br>
  <br> Note: <br> - $mysqli = $conn <br> </p>
  
  <pre><code>$stmt = $mysqli-&gt;prepare("INSERT INTO `inschrijving` (`id`, `bezoeker_naam`, `bezoeker_voornaam`, `bezoeker_email`, `bezoeker_straat`, `bezoeker_huisnummer`, `bezoeker_postnummer`, `bezoeker_plaats`) VALUES (NULL, '{$mysqli-&gt;real_escape_string('?')}', '{$mysqli-&gt;real_escape_string('?')}', '{$mysqli-&gt;real_escape_string('?')}', '{$mysqli-&gt;real_escape_string('?')}', '{$mysqli-&gt;real_escape_string('?')}', '{$mysqli-&gt;real_escape_string('?')}', '{$mysqli-&gt;real_escape_string('?')}');");}
  
                   $stmt-&gt;bind_param("sssssss", $naam, $voornaam, $email, $straat, $huisnummer, $postcode, $plaats);
  
                   $naam = $_POST['naam'];
                   $voornaam = $_POST['voornaam'];
                   $email = $_POST['email'];
                   $straat = $_POST['straat'];
                   $huisnummer = $_POST['nummer'];
                   $postcode = $_POST['postcode'];
                   $plaats = $_POST['plaats'];
  
                   $stmt-&gt;execute();
  </code></pre>
  
  <p>The error I got was this:</p>
  
  <blockquote>
    <p>mysqli_stmt::bind_param(): Number of variables doesn't match number of
    parameters in prepared statement</p>
  </blockquote>
  
  <p>I am new doing prepared statements and I need someone to point my faults out on this. It will really help me get to know more about prepared statements. :)</p>