title: Mysqli Problem: Number of elements in type definition string doesn't match number of bind variables
body: <p>Now this sounds and seems straightforward but am stuck really.</p>
  
  <p>I try running this query</p>
  
  <pre><code>$sql="insert into employers (id, username, password, email, contact_person, company_name, location_country, location_state,     location_address, website, profile, logo, subdomain, activation_key, ipaddress) values ('', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
  
  $params="$reg_username, $reg_password, $reg_email, $reg_contact_person, $reg_companyname, $reg_country, $reg_state, $reg_address, $reg_website, $reg_profile, $reg_logo, $reg_subdomain, $reg_activation_key, $reg_ip";
  
  $resultobj=otherquery ($sql, "sssssssssbssss", $params);
  
  function otherquery ($sql, $types, $params)
      {
         $connection = getConnect ();  
         $result = $connection-&gt;prepare("$sql");
         $result-&gt;bind_param($types, $params);
         $status = $result-&gt;execute();
         $result-&gt;store_result();
         $return=array('obj'=&gt;$result, 'status' =&gt; $status, 'data'=&gt;array());
         return $return; 
      }
  </code></pre>
  
  <p>and i keep getting this error: </p>
  
  <pre><code>Warning: mysqli_stmt::bind_param() [mysqli-stmt.bind-param]: Number of elements in type definition string doesn't match number of bind variables in /home/xyz/public_html/xyzabc.com/functions.php on line 69
  </code></pre>
  
  <p>What am i not counting correctly?</p>
  
  <p>Thanks</p>