I doubt that it's a MySQL version problem. My guess is that it's a PHP configuration issue, specifically the magic_quotes_gpc setting. Probably the script depends on it being turned on (or was ignorant of the fact and just happened to work with it on), and now that you've ported it to a host which has it turned off (which is now the recommended mode due to it being determined that the magic quotes feature was not such a good idea), you need to use an appropriate SQL escaping mechanism, probably [man]mysql_real_escape_string/man if using the mysql_*() functions.