Finishing off the mysql to mysqli conversion. Supposedly there is a function called `mysqli_real_escape_string` too, but my version of MAMP didn't know what that was. This will do, since there is generally a database connection anywhere we'll be escaping these strings anyway.