title: Using mysqli_escape_string error
body: <p>How come I kept receiving this  errror when I am using this mysqli_real_escape_string()?</p>
  
  <pre><code>mysqli_real_escape_string() expects exactly 2 parameters, 1 given in C:\xampp\htdocs\beatbeast\reg.php on line 6
  </code></pre>
  
  <p>I already pass the connection, and the strings that are needed to be sanitize, but how come i keep on getting that error?</p>
  
  <p>here's my code</p>
  
  <pre><code>&lt;?php
      class Db_DatabaseUtilities{
  
          public static function registerAccount($conn,$username,$password,$email){
              if(!isset($conn)){
                      echo"XDDDDDDDDD";
              }
              $username = mysqli_real_escape_string($conn,$username);
              $email =mysqli_real_escape_string($conn,$username);
              $password = mysqli_real_escape_string($conn,$password);
              $hashedpass = crypt($password,$username);
  
              $sql = "INSERT INTO accounts ('username','password','email') VALUES('{$username}','{$hashedpass}','{$email}')";
              Db_DatabaseUtilities::perform_query($conn, $sql);
          }
  
          public static function perform_query($conn,$sql){
              $result_set = $conn-&gt;query($sql);
              if(!$result_set){
                  die("Die Database Query Failed");
              }else{
                  return $result_set;
              }
          }       
      }
  </code></pre>