title: PHP mysql_real_escape_string returns empty string
body: <p>I'm trying to work a bit of security and sanitization into my databases application (for a class).  to start off with, i'm trying to use mysql_real_escape_string, but whenever i use it, it always returns an empty string!</p>
  
  <p>Here's the connection code:</p>
  
  <pre><code>include_once ("./connect.php");
  $db_connection = new mysqli($SERVER, $USERNAME, $PASSWORD, $DATABASE);
  if (mysqli_connect_errno()) {
      echo("Can't connect to MySQL Server. Error code: " . mysqli_connect_error());
      return null;
  }
  $field = mysql_real_escape_string($_GET['value']);
  $upc = $_GET['upc'];
  $type = $_GET['field_type'];
  echo $field;
  echo $upc;
  echo $type;
  </code></pre>
  
  <p>When the php actually gets executed, the $upc and $type gets printed, but NOTHING for $field.  Ive tried using an intermediate string, but i get the same result.  I'm seriously at a loss as to what it is thats going wrong here.</p>
  
  <p>Also, I've done a var_dump on <code>$field</code>, and it claims <code>mysql_real_escape_string</code> returns <code>FALSE</code>, which is supposed to happen when there isn't a connection(?), but there is one.</p>