mysql_real_escape_string($text) command need connection with database. So, you need to open connection before this command and then close the connection after it.
your code is:
mysql_connect('127.16.1.11','admin','password');
mysql_real_escape_string($text);
mysql_close();