Escape database information

The database information is going as a string directly into a PHP file and should be escaped so that whatever was entered will also become a valid string. Since the string is stored between single quotes, only single quotes and backslashes need escaping.