title: Prepared statements with varying parameters
body: <p>All I need is to know how to have a mysqli_stmt_bind_param that can accept 1-4 strings. With placeholders ("?"), in mysqli_stmt_bind_param, only "$stmt, "s", $Interest" will work when 1 interest is searched for or "$stmt, "ssss", $Interest" when 'Any Interest' is searched for.</p>
  
  <p>Thanks!</p>
  
  <pre><code>    $Interest = $_GET['interestId'];
  
  $sql = "SELECT * from User WHERE (Interest1 = '$Interest' OR Interest2 = '$Interest' OR Interest3 = '$Interest') OR '$Interest' = 'Any Interest';";
  
  
          echo "&lt;h1 class='contact-intro'&gt;";
          echo " Welcome to the business card library for $Interest! &lt;/h1&gt;";
  
  $stmt = mysqli_stmt_init($link);
  //Prepare the prepare statements
  if (!mysqli_stmt_prepare($stmt, $sql)) {
      echo "SQL statement failed";
  
  } else {
      //Bind parameters to the placeholder(s)
      mysqli_stmt_bind_param($stmt, $Interest);
      //Run parameters inside database
      mysqli_stmt_execute($stmt);
      $result = mysqli_stmt_get_result($stmt);
      //   $result = mysqli_query($link, $sql);
        $resultCheck = mysqli_num_rows($result);
  if ($resultCheck &gt; 0) {
      while ($row = mysqli_fetch_assoc($result)) {
  (lots of echos.......)
  </code></pre>
  
  <p>UPDATED FULL CODE AND DESCRIPTION OF ISSUE.</p>