title: bind_param issue PHP prepared Insert statement
body: <p>I have a user reg form
  which then inserts into the db however its throwing up a bind param error</p>
  
  <pre><code>if(isset($_POST['submit'])){
  // Login Query
  // Connection
  $mysqli = new mysqli("localhost", "root", "", "pg");
  if ($mysqli-&gt;connect_errno) {
      echo "Failed to connect to MySQL: (" . $mysqli-&gt;connect_errno . ") " . $mysqli-&gt;connect_error;
  }
  // Query 
  $query = "INSERT INTO `affiliates` (aid,affname,title,fname,lname,add1,add2,add3,city,county,country,pcode,email,password,paymethod) VALUES (,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
  $stmt = $mysqli-&gt;prepare($query);
  $stmt-&gt;bind_param('ssssssssssssss',$_POST['affname'],$_POST['title'],$_POST['fname'],$_POST['lname'],$_POST['add1'],$_POST['add2'],$_POST['add3'],$_POST['city'],$_POST['county'],$_POST['country'],$_POST['pcode'],$_POST['email'],$_POST['password'],$_POST['paymethod']); // If 2x Variables are used etc 's' would become 'ss',$_GET['VAR'],$_GET['VAR']
  // Bind Results
  $stmt-&gt;execute();
  //$result = $stmt-&gt;get_result()-&gt;fetch_all();
  }
  </code></pre>
  
  <p>I cant work out whats wrong can anyone help
  thanks</p>
  
  <hr>
  
  <p>Updated Form &amp; Query Code </p>
  
  <pre><code>        &lt;form id="form1" name="form1" method="post" action="&lt;?php echo $_SERVER['PHP_SELF'];?&gt;"&gt;
      &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="affname" id="textfield" /&gt;
      &lt;/p&gt;
      &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="title" id="textfield" /&gt;
      &lt;/p&gt; &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="fname" id="textfield" /&gt;
      &lt;/p&gt; &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="lname" id="textfield" /&gt;
      &lt;/p&gt; &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="add1" id="textfield" /&gt;
      &lt;/p&gt; &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="add2" id="textfield" /&gt;
      &lt;/p&gt; &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="add3" id="textfield" /&gt;
      &lt;/p&gt; &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="city" id="textfield" /&gt;
      &lt;/p&gt; &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="county" id="textfield" /&gt;
      &lt;/p&gt; &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="country" id="textfield" /&gt;
      &lt;/p&gt; &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="pcode" id="textfield" /&gt;
      &lt;/p&gt; &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="email" id="textfield" /&gt;
      &lt;/p&gt;
      &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="password" id="textfield" /&gt;
      &lt;/p&gt;
      &lt;p&gt;
      &lt;label for="textfield"&gt;&lt;/label&gt;
      &lt;input type="text" name="paymethod" id="textfield" /&gt;
      &lt;input type="hidden" value="" name="aid" /&gt;
      &lt;/p&gt;
      &lt;p&gt;
      &lt;input type="submit" name="submit" id="submit" value="Submit" /&gt;
      &lt;/p&gt;
      &lt;/form&gt;
      &lt;?php
      if(isset($_POST['submit'])){
      // Login Query
      // Connection
      $mysqli = new mysqli("localhost", "root", "", "pg");
      if ($mysqli-&gt;connect_errno) {
        echo "Failed to connect to MySQL: (" . $mysqli-&gt;connect_errno . ") " . $mysqli-&gt;connect_error;
      }
      // Query 
      $query = "INSERT INTO `affiliates` (aid,affname,title,fname,lname,add1,add2,add3,city,county,country,pcode,email,password,paymethod) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
      $stmt = $mysqli-&gt;prepare($query);
      $stmt-&gt;bind_param('sssssssssssssss',$_POST['aid'],$_POST['affname'],$_POST['title'],$_POST['fname'],$_POST['lname'],$_POST['add1'],$_POST['add2'],$_POST['add3'],$_POST['city'],$_POST['county'],$_POST['country'],$_POST['pcode'],$_POST['email'],$_POST['password'],$_POST['paymethod']); // If 2x Variables are used etc 's' would become 'ss',$_GET['VAR'],$_GET['VAR']
      // Bind Results
      $stmt-&gt;execute();
      //$result = $stmt-&gt;get_result()-&gt;fetch_all();
      }
  </code></pre>
  
  <p>I have amended the query and now have the correct amount of vars being passed
  However it now shows NO errors but also does not insert the data</p>