mysqli_real_escape_string requires db connection

http://www.w3schools.com/php/func_mysqli_real_escape_string.asp
http://www.php.net/mysqli_real_escape_string