Your problem here is not with mysql_real_escape_string. Your problem is with the fact that you don't have a connection to a server. Do you have a database 'periodic_table' running locally with 'username' and 'password' for your login credentials?
thetaiko
2010-03-24 22:17:28