title: Call to undefined function protect()
body: <p>I have a PHP function in my site to help eliminate SQL Injection. </p>
  
  <p>I don't know if I have done this right, and I've tried to Google my question however it seems to be only wordpress related. I have my function in a file named <code>requirements.php</code> and have used <code>require("requirements.php");</code> in order to call the file.</p>
  
  <p>However when it's called in the html there is the error </p>
  
  <blockquote>
    <p>Call to undefined function protect()</p>
  </blockquote>
  
  <p>Here is the PHP script where the file is called:</p>
  
  <pre><code>&lt;?php
  require("database.php");
  require("requirements.php");
  $email = protect($con, $_POST['email']);
  $password = protect($con, $_POST['password']);
  $confpassword = protect($con, $_POST['confpassword']);
  
  (The file continutes...)
  </code></pre>
  
  <p>And here is the file "requirements.php"</p>
  
  <pre><code>&lt;?php
      session_start();
  
  
       function protect ($con, $str){
          $str = mysqli_real_escape_string($con, $str);
          return $str;
      }
  ?&gt;
  </code></pre>
  
  <p>The error occurs on line 4 reading:</p>
  
  <pre><code>$email = protect($con, $_POST['email']);
  </code></pre>
  
  <p>(Where <code>protect</code> is called)</p>
  
  <p>I had someone working on my project who did this, however they aren't around to ask about this therefore I figured after some trial and error I would ask here.</p>