title: Strict standards: only variables should be passed by reference - why does this still work and how can I correct it?
body: <p>I am trying to query a database to check if an email is already registered, following submission of user details. </p>
  
  <p>However, I get a "Strict standards: Only variables should be passed by reference" error with the following code (excerpt):</p>
  
  <pre><code>} else  if (isset($_POST['srSubmit']) &amp;&amp; $_POST['srEmail']) {
  
      //check if email already taken
      if ($stmtreg = $mysqli-&gt;prepare("SELECT user_email FROM users WHERE user_email = ?")) {
          $stmtreg-&gt;bind_param("s", strtolower($_POST['srEmail']));
          $stmtreg-&gt;execute();
          $stmtreg-&gt;store_result();
          $num_rows = $stmtreg-&gt;num_rows();
          $stmtreg-&gt;bind_result($email);
          $stmtreg-&gt;fetch();
          $stmtreg-&gt;close();
      }
  </code></pre>
  
  <p>I have two questions: i) why does the script still work, even with this error? an ii) what is causing it and how do I fix it?</p>
  
  <p>Thanks </p>