title: What exactly does first parameter in bind_param() do?
body: <p>I am trying to understand prepared statements using PHP and mysqli. I tried to read on some tutorials, manual and this one: <a href="https://stackoverflow.com/questions/10874644/bind-param-in-php">Bind_Param in PHP</a>, but I have not yet found any satisfying answer.</p>
  
  <p>Someone wrote in answer as:</p>
  
  <blockquote>
    <p>When you prepare an SQL statement, you can insert a placeholder (?)
    where a column value would go, then use bind_param() to safely
    substitute that placeholder for the real column's value. This prevents
    any possibility of an SQL injection.</p>
  </blockquote>
  
  <p>I found some code in tutorials like this: </p>
  
  <pre><code>$stmt = $con-&gt;prepare("INSERT INTO user_accounts VALUES (?,?,?,?)");
  
  $stmt-&gt;bind_param('xyz', $sample1, $sample2, $sample3, $sample4);   // bind to the parameter
  </code></pre>
  
  <p>I understood that we write '?' instead of our variable, so that the actual values can be given later. MySQL prepares a plan for query execution, and then variables are given as parameters.</p>
  
  <p>What does this line of code mean?</p>
  
  <pre><code>bind_param('xyz', $sample1, $sample2, $sample3, $sample4);  
  </code></pre>
  
  <p>Four variables are given with something 'xyz' as parameters... What exactly does parameter 'xyz' mean here? Is it necessary to write and will it later be used? I didn't find it used elsewhere.</p>
  
  <p>I only want an answer for the first parameter:</p>
  
  <p><img src="https://i.stack.imgur.com/121OV.png" alt="enter image description here"></p>